資訊與社區

討論回覆

GEThttps://openapi.longbridge.com/v1/content/topics/{topic_id}/comments

鑑權

簽名方式:每個請求用 App Key / Secret 簽名。請求頭如下:

名稱類型必填說明
Authorizationstring · header必填OpenAPI 後台 上的賬戶 Access Token,作為原始 token 傳入(不帶 Bearer 前綴),並參與簽名計算。
X-Api-Keystring · header必填你的 App Key。
X-Timestampstring · header必填請求時間戳,單位秒(Unix 時間)。
X-Api-Signaturestring · header必填HMAC-SHA256 簽名。格式:HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=。

獲取指定討論下的回覆列表,支持分頁。完整社區討論可瀏覽 社區。

每條回覆包含作者信息、正文(純文本)、互動數據及 reply_to_id 字段:"0" 表示頂層回覆,其他值表示對指定回覆的嵌套回覆。

>_ CLI
longbridge topic replies 6993508780031016960
longbridge topic replies 6993508780031016960 --page 2 --size 20

請求

路徑參數

名稱類型必填說明
topic_idstring必填討論 ID,如 `6993508780031016960`

查詢參數

名稱類型必填說明
pageinteger可選頁碼,默認 1
sizeinteger可選每頁數量,範圍 1~50,默認 20

響應

響應欄位

名稱類型必填說明
itemsobject[]必填回覆列表
└ idstring必填回覆 ID
└ topic_idstring必填所屬討論 ID
└ bodystring可選回覆正文(純文本)
└ reply_to_idstring可選父回覆 ID,`"0"` 表示頂層回覆
└ authorobject可選作者信息
└ imagesobject[]可選附圖列表
└ likes_countint32可選點讚數
└ comments_countint32可選嵌套回覆數
└ created_atstring必填創建時間,Unix 時間戳(秒)

響應 JSON 示例

{
  "code": 0,
  "message": "success",
  "data": {
    "items": [
      {
        "id": "7001234567890123456",
        "topic_id": "6993508780031016960",
        "body": "Great analysis!",
        "reply_to_id": "0",
        "author": {
          "member_id": "10087",
          "name": "John Smith",
          "avatar": "https://example.com/avatar2.jpg"
        },
        "images": [],
        "likes_count": 5,
        "comments_count": 2,
        "created_at": "1742001500"
      },
      {
        "id": "7001234567890123457",
        "topic_id": "6993508780031016960",
        "body": "I disagree on the valuation part.",
        "reply_to_id": "7001234567890123456",
        "author": {
          "member_id": "10088",
          "name": "Alice Lee",
          "avatar": "https://example.com/avatar3.jpg"
        },
        "images": [],
        "likes_count": 1,
        "comments_count": 0,
        "created_at": "1742001800"
      }
    ]
  }
}

錯誤碼

參見錯誤碼文檔。