# 獲取每日賣空成交

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

  • 介紹

    獲取指定港股或美股的每日賣空成交數據,支援分頁續拉

  • 參數

    參數 類型 說明
    code str 股票代碼
    next_key str 分頁標識
    num int 每頁數量
  • 返回

    參數 類型 說明
    ret RET_CODE 接口調用結果
    us_df pd.DataFrame 美股每日賣空數據;當 ret != RET_OK 時為錯誤描述字符串
    hk_df pd.DataFrame 港股每日賣空數據;當 ret != RET_OK 時為 None
    • 美股 DataFrame(us_df)欄位說明:

      欄位 類型 說明
      timestamp int 交易日時間戳(秒級 Unix 時間戳,當日零點)
      timestamp_str str 交易日字符串
      total_shares_short int 賣空總股數
      nasdaq_shares_short int 納斯達克賣空股數
      nyse_shares_short int 紐交所賣空股數
      short_percent float 賣空比例
      volume int 成交量(股)
      close_price float 收盤價
      last_close_price float 上次收盤價
      daily_trade_avg_ratio float 日均成交比例
    • 美股 us_df.attrs 附加屬性:

      屬性 類型 說明
      next_key str 分頁標識
    • 港股 DataFrame(hk_df)欄位說明:

      欄位 類型 說明
      timestamp int 交易日時間戳(秒級 Unix 時間戳,當日零點)
      timestamp_str str 交易日字符串
      shares_traded int 成交量(股)
      turnover float 成交額
      short_sell_shares_traded int 做空成交量(股)
      short_sell_turnover float 做空成交額
      open_price float 開盤價
      close_price float 收盤價
      last_close_price float 上次收盤價
      daily_trade_avg_ratio float 日均成交比例
    • 港股 hk_df.attrs 附加屬性:

      屬性 類型 說明
      next_key str 分頁標識
      aggregated_short int 未平倉股數
      aggregated_short_ratio float 佔流通股比例
      new_time_str str 最新數據時間
  • Example

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

ret, us_df, hk_df = quote_ctx.get_daily_short_volume("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  ...  last_close_price  daily_trade_avg_ratio
0  1778169600    2026-05-08  ...             477.4                  11.36
1  1778083200    2026-05-07  ...             463.0                  11.80
2  1777996800    2026-05-06  ...             472.2                  12.22
3  1777910400    2026-05-05  ...             473.0                  12.76
4  1777824000    2026-05-04  ...             467.8                  13.02
5  1777478400    2026-04-30  ...             479.2                  13.09
6  1777392000    2026-04-29  ...             473.8                  14.02
7  1777305600    2026-04-28  ...             478.6                  14.13
8  1777219200    2026-04-27  ...             493.4                  14.14
9  1776960000    2026-04-24  ...             495.2                  14.18

[10 rows x 10 columns]
1
2
3
4
5
6
7
8
9
10
11
12
13

接口限制

  • 每 30 秒內最多請求 30 次。
  • 支援港股、美股正股及基金。