资讯与社区
鉴权
签名方式:每个请求用 App Key / Secret 签名。请求头如下:
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string · header | 必填 | OpenAPI 后台 上的账户 Access Token,作为原始 token 传入(不带 Bearer 前缀),并参与签名计算。 |
X-Api-Key | string · header | 必填 | 你的 App Key。 |
X-Timestamp | string · header | 必填 | 请求时间戳,单位秒(Unix 时间)。 |
X-Api-Signature | string · header | 必填 | HMAC-SHA256 签名。格式:HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=。 |
获取指定股票的资讯列表。完整资讯流可访问 资讯。
# latest news for Tesla
longbridge news TSLA.US
# latest news for Apple
longbridge news AAPL.US
# latest news for NVDA
longbridge news NVDA.US
请求
路径参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
symbol | string | 必填 | 股票代码,使用 `ticker.region` 格式,例如:`AAPL.US` |
响应
响应字段
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
items | object[] | 可选 | 资讯列表 |
└ id | string | 可选 | 资讯 ID |
└ title | string | 可选 | 标题 |
└ description | string | 可选 | 摘要/描述 |
└ url | string | 可选 | 资讯详情链接 |
└ comments_count | integer | 可选 | 评论数 |
└ likes_count | integer | 可选 | 点赞数 |
└ shares_count | integer | 可选 | 分享数 |
└ published_at | string | 可选 | 发布时间,Unix 时间戳(秒) |
响应 JSON 示例
{
"code": 0,
"message": "success",
"data": {
"items": [
{
"id": "279528757",
"title": "Beats cross-industry collaboration breaks the circle with Nike! Apple aims to ignite a new wave of wearable consumer trends, while Nike bets on the narrative of \"sports technology.\"",
"description": "Apple's Beats has collaborated with Nike to launch a limited edition Powerbeats Pro 2 headphones, featuring Nike's Swoosh logo. The headphones will be available online and at select Apple Stores on March 20, priced at $250. This marks Beats' first collaboration with an external sports brand, signifying further synergy between the two companies in branding and product ecosystems. The headphones feature real-time heart rate tracking and a battery life of up to 45 hours",
"url": "https://longbridge.com/news/279528757",
"published_at": "1773805586",
"comments_count": 0,
"likes_count": 0,
"shares_count": 0
}
]
}
}错误码
参见错误码文档。