# 獲取產業板塊成分股

get_industrial_plate_stock(chain_id=None, plate_id=None, market_list=None, sort_field=None, ascend=None, count=None, page=None)

  • 介紹

    獲取產業板塊成分股,返回指定產業板塊包含的股票列表,支持市場篩選、排序和分頁。

  • 參數

    參數 類型 說明
    chain_id int 產業鏈 ID(與 plate_id 二選一,plate_id 優先)
    plate_id int 產業板塊 ID(優先使用)
    market_list list[Market] 市場篩選(支持 HK/US/CN/JP/SG/MY),不傳默認全部
    sort_field PlateStockSortField 排序字段,默認市值
    ascend bool 升序 True / 降序 False,默認 False(降序)
    count int 每頁數量 [1, 200],默認 50
    page str 翻頁遊標
  • 返回

    參數 類型 說明
    ret RET_CODE 接口調用結果
    data pd.DataFrame 當 ret == RET_OK,返回數據
    str 當 ret != RET_OK,返回錯誤描述
    • 數據格式如下:
      字段 類型 說明
      security str 股票代碼(如 'US.AAPL'
      name str 股票名稱
  • Example

from futu import *

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

ret, data, next_page, all_count = quote_ctx.get_industrial_plate_stock(plate_id=10010508, count=2)
if ret == RET_OK:
    print(f'總數據量: {all_count}')
    print(data)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
  • Output
總數據量: 111
  security name
0  US.NVDA  英偉達
1  US.AAPL   蘋果
1
2
3
4

接口限制

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