Skip to content

單個宏觀指標的歷史公佈值 ​

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_idint查詢是宏觀指標 ID,來自 quote.macro_indicator_list 的 indicator_id
timestring查詢否截止日期 yyyy-MM-dd,從該日往前拉;不傳默認當前時間。日期格式 YYYY-MM-DD,時區隨標的市場
max_countint查詢否條數,默認 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_timestring數據日期,格式 yyyy-MM-dd(北京/香港時區)
data.release_timestring公佈時間(北京/香港時區)
data.valuestring公佈值(已按 pow 還原)
data.predict_valuestring預測值(已按 pow 還原);無預測時為 null
data.previous_valuestring前值(已按 pow 還原)
data.unit_typeint單位:PERCENT 百分比 / VALUE 數值 / INDEX 指數

錯誤碼 ​

ret_codeerror.code說明
0—成功
-3invalid_parameter參數不合法
-8unsupported不支持
-10no_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
  }
}