资讯与社区

讨论回复

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"
      }
    ]
  }
}

错误码

参见错误码文档。