# 获取机构持仓变动

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 次请求
  • 分页请求仅首页计入限频统计