# Get Short Interest

get_short_interest(code, next_key=None, num=None)

  • Description

    Get the short interest history for a specified HK or US stock, with pagination support

  • Parameters

    Parameter Type Description
    code str Stock code
    next_key str Pagination key
    num int Page size
  • Return

    Parameter Type Description
    ret RET_CODE API call result
    us_df pd.DataFrame US short interest data; error string when ret != RET_OK
    hk_df pd.DataFrame HK short interest data; None when ret != RET_OK
    • US DataFrame (us_df) fields:

      Field Type Description
      timestamp int Trading day timestamp
      timestamp_str str Trading day string
      shares_short int Shares sold short
      short_percent float Short ratio
      avg_daily_share_volume int Average daily share volume
      days_to_cover float Days to cover
      close_price float Close price
      last_close_price float Previous close price
    • US us_df.attrs additional attributes:

      Attribute Type Description
      next_key str Pagination key
    • HK DataFrame (hk_df) fields:

      Field Type Description
      timestamp int Trading day timestamp
      timestamp_str str Trading day string
      close_price float Close price
      last_close_price float Previous close price
      aggregated_short int Aggregated short positions (shares)
      aggregated_short_ratio float Short ratio of shares outstanding
    • HK hk_df.attrs additional attributes:

      Attribute Type Description
      next_key str Pagination key
  • Example

from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, us_df, hk_df = quote_ctx.get_short_interest("HK.00700")
if ret == RET_OK:
    print(hk_df)
else:
    print('error:', hk_df)
quote_ctx.close()
1
2
3
4
5
6
7
8
9
  • Output
   timestamp timestamp_str  aggregated_short  aggregated_short_ratio  close_price  last_close_price
0  1777478400    2026-04-30          51480638                    0.56        467.8             479.2
1  1776960000    2026-04-24          51888755                    0.56        493.4             495.2
2  1776355200    2026-04-17          47974208                    0.52        510.5             517.0
3  1775750400    2026-04-10          48424833                    0.53        504.5             508.5
4  1775059200    2026-04-02          49982828                    0.54        489.2             496.6
5  1774540800    2026-03-27          52744147                    0.57        493.4             495.6
6  1773936000    2026-03-20          51710854                    0.56        508.0             513.0
7  1773331200    2026-03-13          48105325                    0.52        547.5             546.5
8  1772726400    2026-03-06          42404275                    0.46        519.0             502.0
9  1772121600    2026-02-27          36037870                    0.39        518.0             512.0
1
2
3
4
5
6
7
8
9
10
11

Restrictions

  • Maximum 30 requests per 30 seconds.
  • Supports HK and US equities and funds.