社區內容搜索
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"
}
]
}
}