社区内容搜索
GET/api/v1.0/quote/community-search按关键词或标的名称搜索牛牛圈社区内容(讨论 FEED / 话题 TOPIC / 直播 LIVE),返回结构化列表。 返回包含:id、community_type(FEED / TOPIC / LIVE)、title、publish_time(毫秒时间戳)、url、cover_image。 行情标的搜索请用 quote.search_quote。
请求参数
| 参数 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
keyword | string | 查询 | 是 | 搜索关键词或标的名称,必填,如 AAPL / 腾讯 / 期权 |
community_type | string | 查询 | 否 | 社区内容类型过滤:ALL=全部(默认),FEED=讨论,TOPIC=话题,LIVE=直播 |
sort_type | string | 查询 | 否 | 排序方式:TIME=按最新时间(默认),HEAT=按热度 |
lang | string | 查询 | 否 | 语言过滤;不传由服务端按默认设置决定 |
page_size | int | 查询 | 否 | 返回条数,默认 10,范围 1~50 |
请求示例
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/community-search?keyword=1&community_type=1&sort_type=1' \
-H 'Authorization: Bearer <AccessToken>' | jq响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
data.items | object[] | |
data.items[].id | string | 社区内容唯一 ID |
data.items[].community_type | string | 社区内容类型:FEED / TOPIC / LIVE |
data.items[].title | string | 标题或讨论正文摘要 |
data.items[].publish_time | integer | 发布时间,Unix 毫秒时间戳 |
data.items[].url | string | 跳转链接 |
data.items[].cover_image | string | 配图链接 |
错误码
| ret_code | error.code | 说明 |
|---|---|---|
| 0 | — | 成功 |
| -3 | invalid_parameter | 参数缺失或不在允许范围内 |
| -7 | invalid_symbol | 标的不存在 |
| -8 | unsupported | 市场或品类不支持 |
| -9 | permission_denied | 没有对应权限 |
| -10 | no_data | 没有可返回的数据 |
| -11 | rate_limited | 调用过于频繁 |
响应示例
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"items": [
{
"id": "example",
"community_type": "example",
"title": "example",
"publish_time": 0,
"url": "example",
"cover_image": "example"
}
]
}
}