# 獲取產業鏈詳情

get_industrial_chain_detail(chain_id)

  • 介紹

    獲取產業鏈詳情,返回指定產業鏈的完整結構信息,包含層級節點列表和相關資訊鏈接。

  • 參數

    參數 類型 說明
    chain_id int 產業鏈 ID(從 get_industrial_chain_list 獲取)(必填)
  • 返回

    參數 類型 說明
    ret RET_CODE 接口調用結果
    data dict 當 ret == RET_OK,返回字典數據
    str 當 ret != RET_OK,返回錯誤描述
    • 數據格式如下:
      字段 類型 說明
      chain_id int 產業鏈 ID
      chain_type str 產業鏈類型("CHAIN"/"PARALLEL"/"UP_MID_DOWN")
      name str 產業鏈名稱
      node_list list[dict] 節點列表(按層級分組)
      information_list list[dict] 資訊鏈接列表
      node_id int 節點 ID
      parent_node_id int 父節點 ID(根節點爲 0)
      layer int 節點層級(從 1 開始)
      name str 節點名稱
      plate_id int 關聯產業板塊 ID(無關聯爲 N/A)
      title str 資訊標題
      url str 資訊鏈接
  • Example

from futu import *

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

ret, data = quote_ctx.get_industrial_chain_detail(chain_id=9610020)
if ret == RET_OK:
    print(f"chain_id: {data['chain_id']}")
    print(f"chain_type: {data['chain_type']}")
    print(f"name: {data['name']}")
    print(f"node_list (前2項):")
    for node in data['node_list'][:2]:
        print(f"  {node}")
    print(f"information_list: {data['information_list']}")
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  • Output
chain_id: 9610020
chain_type: UP_MID_DOWN
name: AI
node_list (前2項):
  {'node_id': 1, 'parent_node_id': 'N/A', 'layer': 1, 'name': '基礎建設層', 'plate_id': 'N/A'}
  {'node_id': 4, 'parent_node_id': 'N/A', 'layer': 1, 'name': '算法層', 'plate_id': 'N/A'}
information_list: []
1
2
3
4
5
6
7

接口限制

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