# 獲取機構持倉變動

get_institution_holding_change(market, institution_id, change_type=None, sort_field=None, sort_dir=None, count=None, page=None)

  • 介紹

    獲取機構持倉變動,返回指定機構按變動類型(建倉/清倉/增倉/減倉)篩選的持倉變動記錄,支持排序和遊標翻頁。

  • 參數

    參數 類型 說明
    market Market 市場類型(HK/US)(必填)
    institution_id int 機構 ID(必填)
    change_type InstitutionHoldingChangeType 變動類型,默認建倉
    sort_field InstitutionHoldingChangeSortField 排序字段,默認變動比例
    sort_dir RankSortDir 排序方向,默認降序
    count int 返回數量 [1, 200],默認 20
    page str 翻頁遊標
  • 返回

    參數 類型 說明
    ret RET_CODE 接口調用結果
    data pd.DataFrame 當 ret == RET_OK,返回數據
    str 當 ret != RET_OK,返回錯誤描述
    • 數據格式如下:
      字段 類型 說明
      security str 股票代碼(如 'US.AAPL'
      name str 股票名稱
      portfolio_pct float 持股比例(%)
      change_shares int 變動股數
      change_pct float 變動比例(%)
      holding_date int 持倉時間(時間戳)
      source str 披露來源
  • Example

from futu import *

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

# 先獲取機構ID
ret, data, _, _ = quote_ctx.get_institution_list(market=Market.US, count=1)
if ret == RET_OK and len(data) > 0:
    inst_id = data.iloc[0]['institution_id']

    # 查詢持倉變動
    ret, data, next_page, all_count = quote_ctx.get_institution_holding_change(
        market=Market.US, institution_id=inst_id, 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
13
14
15
16
17
18
19
  • Output
總數據量: 87
  security                name  portfolio_pct  change_shares  change_pct holding_date source
0   US.YSS  York Space Systems        14.6594       19012439     14.6594   2026-03-30    13F
1  US.VSNT       Versant Media        12.2661       17356403     12.2661   2026-03-30    13F
1
2
3
4

接口限制

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