单个宏观指标的历史公布值
GET/api/v1.0/quote/macro/indicator-history获取单个宏观指标的历史公布值(按数据日期降序)。 返回 data_time / release_time / value / predict_value / previous_value / unit_type。 indicator_id 来自 quote.macro_indicator_list;time 为截止日(yyyy-MM-dd),不传则从当前时间往前拉。 宏观列表请用 quote.macro_indicator_list。
请求参数
| 参数 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
indicator_id | int | 查询 | 是 | 宏观指标 ID,来自 quote.macro_indicator_list 的 indicator_id |
time | string | 查询 | 否 | 截止日期 yyyy-MM-dd,从该日往前拉;不传默认当前时间。日期格式 YYYY-MM-DD,时区随标的市场 |
max_count | int | 查询 | 否 | 条数,默认 100,最大 1000 |
请求示例
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/macro/indicator-history?indicator_id=1' \
-H 'Authorization: Bearer <AccessToken>' | jq响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
data.data_time | string | 数据日期,格式 yyyy-MM-dd(北京/香港时区) |
data.release_time | string | 公布时间(北京/香港时区) |
data.value | string | 公布值(已按 pow 还原) |
data.predict_value | string | 预测值(已按 pow 还原);无预测时为 null |
data.previous_value | string | 前值(已按 pow 还原) |
data.unit_type | int | 单位:PERCENT 百分比 / VALUE 数值 / INDEX 指数 |
错误码
| ret_code | error.code | 说明 |
|---|---|---|
| 0 | — | 成功 |
| -3 | invalid_parameter | 参数不合法 |
| -8 | unsupported | 不支持 |
| -10 | no_data | 没有数据 |
响应示例
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"data_time": "example",
"release_time": "example",
"value": "example",
"predict_value": "example",
"previous_value": "example",
"unit_type": 0
}
}