Historical prints for one macro indicator
GET/api/v1.0/quote/macro/indicator-historyGet historical prints for one macro indicator (newest data_time first). Returns data_time / release_time / value / predict_value / previous_value / unit_type. indicator_id comes from quote.macro_indicator_list; time is the end date (yyyy-MM-dd), omitted means now. For the indicator catalog use quote.macro_indicator_list.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
indicator_id | int | query | yes | Macro indicator ID from quote.macro_indicator_list |
time | string | query | no | End date yyyy-MM-dd, pull backward from this day; omit for now. Date YYYY-MM-DD in the security's market timezone |
max_count | int | query | no | Row count, default 100, max 1000 |
Example
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/macro/indicator-history?indicator_id=1' \
-H 'Authorization: Bearer <AccessToken>' | jqResponse parameters
| Name | Type | Description |
|---|---|---|
data.data_time | string | Observation date, yyyy-MM-dd (Hong Kong / Beijing timezone) |
data.release_time | string | Release time in Hong Kong / Beijing timezone |
data.value | string | Actual value |
data.predict_value | string | Forecast value; null when missing |
data.previous_value | string | Previous value |
data.unit_type | int | Unit: PERCENT / VALUE / INDEX |
Errors
| ret_code | error.code | Description |
|---|---|---|
| 0 | — | Success |
| -3 | invalid_parameter | Missing or invalid parameter |
| -8 | unsupported | Not supported |
| -10 | no_data | No data |
Response example
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
}
}