# 獲取宏觀指標列表

get_macro_indicator_list(region)

  • 介紹

    獲取宏觀指標列表,返回指定國家/地區的宏觀經濟指標分類及指標信息,包含指標 ID 和名稱,用於後續查詢歷史數據。

  • 參數

    參數 類型 說明
    region MacroRegion 國家/地區(必填)
  • 返回

    參數 類型 說明
    ret RET_CODE 接口調用結果
    data pd.DataFrame 當 ret == RET_OK,返回數據
    str 當 ret != RET_OK,返回錯誤描述
    • 數據格式如下:
      字段 類型 說明
      category_name str 分類名稱(如"全部"/"就業"/"通脹"/"利率")
      indicator_id int 宏觀指標 ID(用於查詢歷史數據)
      name str 指標名稱
  • Example

from futu import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data = quote_ctx.get_macro_indicator_list(region=MacroRegion.US)
if ret == RET_OK:
    print(data.head(2))
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
  • Output
category_name  indicator_id              name
0            物價    1003000003  美國生產者物價指數(PPI)同比
1            物價    1003000001         美國核心CPI同比
1
2
3

接口限制

  • 30 秒內最多 60 次請求
  • 分頁請求僅首頁計入限頻統計