# 獲取賣空異動榜

get_short_selling_rank(market=None, sort_field=None, sort_dir=None, count=10, offset=None, plate_list=None)

  • 介紹

    獲取賣空異動榜,返回美股/港股賣空數據排行,支持14種排序維度和行業板塊篩選,包含賣空數量、比例、空頭持倉、回補天數等數據。

  • 參數

    參數 類型 說明
    market Market 市場類型(HK/US),默認 US
    sort_field ShortSellingSortField 排序字段,默認賣空變化量
    sort_dir RankSortDir 排序方向,默認降序
    count int 返回數量 [1, 35],默認 10
    offset int 起始位置,默認 0
    plate_list list[str] 行業板塊代碼列表(如 ['US.BK2024']),空=全部
  • 返回

    參數 類型 說明
    ret RET_CODE 接口調用結果
    data pd.DataFrame 當 ret == RET_OK,返回 (all_count, DataFrame) 元組
    str 當 ret != RET_OK,返回錯誤描述
    • 數據格式如下:
      字段 類型 說明
      security str 股票代碼(如 'US.GME'
      name str 股票名稱
      close_price float 收盤價
      change_ratio float 漲跌幅(%)
      change_ratio_5d float 5日漲跌幅(%)
      change_ratio_10d float 10日漲跌幅(%)
      volume int 成交量
      short_number int 賣空數量
      short_number_change int 賣空變化量
      short_ratio float 賣空比例(%)
      short_ratio_change float 賣空變化比例(%)
      short_position_volume int 空頭持倉數量
      short_position_ratio float 空頭持倉比例(%)
      days_to_cover float 回補天數
      week_avg_short_number int 近一週日均賣空
      week_avg_short_ratio float 近一週日均賣空比例(%)
      month_avg_short_number int 近一月日均賣空
      month_avg_short_ratio float 近一月日均賣空比例(%)
  • Example

from futu import *

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

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

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
  • Output
總數據量: 0
  security           name  close_price  change_ratio  change_ratio_5d  change_ratio_10d     volume  short_number  short_number_change  short_ratio  short_ratio_change  short_position_volume  short_position_ratio  days_to_cover  week_avg_short_number  week_avg_short_ratio  month_avg_short_number  month_avg_short_ratio
0  US.SKYQ     Sky Quarry       1.9000         62.39            45.03              4.39  221413731      20302431             20226903         9.16            26780.66                 327119                  6.82            1.0                4111613                  9.19                 1136188                   8.26
1  US.TNON  Tenon Medical       0.6215         77.57             0.72              2.89  271138156      15289764             15273389         5.63            93272.60                 149174                  1.28            2.9                3063337                  5.01                  772705                   5.04
1
2
3
4

接口限制

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