基本面
鉴权
签名方式:每个请求用 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=。 |
获取按月统计的机构评级(买入/持有/卖出)分布时间线,最新月份在前。
请求
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
symbol | string | 必填 | 证券代码,例如 `AAPL.US` |
响应
响应字段
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
elist | object[] | 可选 | 月度评级分布列表,最新月份在前 |
└ buy | string | 可选 | 买入评级数量 |
└ over | string | 可选 | 跑赢市场评级数量 |
└ hold | string | 可选 | 持有评级数量 |
└ under | string | 可选 | 跑输市场评级数量 |
└ sell | string | 可选 | 卖出评级数量 |
└ total | string | 可选 | 机构总数 |
└ no_opinion | string | 可选 | 无观点的分析师数。 |
└ date | string | 可选 | Unix 时间戳(秒) |
tlist | object[] | 可选 | 时间序列列表。 |
└ date | string | 可选 | Unix 时间戳(秒) |
└ close | string | 可选 | 收盘价。 |
└ high_price | string | 可选 | 最高价。 |
└ low_price | string | 可选 | 最低价。 |
响应 JSON 示例
{
"code": 0,
"message": "success",
"data": {
"elist": [
{
"date": 1746057600,
"buy": "18",
"over": "5",
"hold": "17",
"under": "3",
"sell": "4",
"total": "51"
},
{
"date": 1743379200,
"buy": "17",
"over": "6",
"hold": "18",
"under": "3",
"sell": "5",
"total": "53"
}
]
}
}错误码
参见错误码文档。