空頭持倉
GET/v1/quote/{symbol}/short-selling/short-interest獲取股票的空頭持倉數據(港股 / 美股),數據按交易日由新到舊返回。港股為空頭持倉詳情,美股為月度空頭報告。
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
symbol | string | 路徑 | 是 | 標的代碼,如 HK.00700 或 US.AAPL。 |
count | int | 查詢 | 否 | 返回條數。預設 30,最大 90。 |
請求示例
bash
curl "$ip/v1/quote/HK.00700/short-selling/short-interest?count=2" | jq響應字段
港股 items 字段:
| 字段 | 類型 | 說明 |
|---|---|---|
timestamp | int | 數據時間(毫秒時間戳)。 |
timestamp_str | string | 數據日期(yyyy-MM-dd)。 |
aggregated_short | string | 未平倉股數(int64 序列化為 string)。 |
aggregated_short_ratio | float | 佔流通股比例(%)。 |
close_price | float | 當日收盤價。 |
last_close_price | float | 上一交易日收盤價。 |
avg_cost | float | 空倉平均成本。 |
avg_daily_short_volume | string | 日均賣空成交量。 |
美股 items 字段:
| 字段 | 類型 | 說明 |
|---|---|---|
timestamp | int | 數據時間(毫秒時間戳)。 |
timestamp_str | string | 數據日期(yyyy-MM-dd)。 |
shares_short | string | 賣空股數(int64 序列化為 string)。 |
short_percent | float | 賣空比例(%)。 |
avg_daily_share_volume | string | 平均日成交量。 |
days_to_cover | float | 回補天數。 |
close_price | float | 收盤價。 |
last_close_price | float | 上一交易日收盤價。 |
avg_daily_short_volume | string | 日均賣空成交量。 |
限制範圍
- 市場:僅支持港股(HK)與美股(US)。
- 品類:僅支持正股與基金(ETF);指數、窩輪、期權等不支持。
- 不支持的市場或品類返回 unsupported 錯誤。
錯誤碼
| ret_code | error.code | 觸發條件 | 處理建議 |
|---|---|---|---|
| 0 | — | 成功 | — |
| -3 | invalid_parameter | count 越界 / symbol 格式非法 | 校正參數後重試 |
| -7 | invalid_symbol | symbol 格式合法但標的不存在 | 核對標的代碼 |
| -8 | unsupported | 市場或品類不在支持範圍 | 僅對港股/美股正股與基金調用 |
| -10 | no_data | 標的無空頭持倉數據 | 視為該標的暫無空頭數據 |
| -5 | internal_error | 網關或後端內部錯誤 | 重試;持續失敗聯繫支持 |
響應示例
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"items": [
{
"aggregated_short": "54177721",
"aggregated_short_ratio": 0.59,
"avg_cost": 456.399,
"avg_daily_short_volume": "3755740",
"close_price": 456.4,
"last_close_price": 454.9,
"timestamp": 1778774400000,
"timestamp_str": "2026-05-15"
},
{
"aggregated_short": "44972868",
"aggregated_short_ratio": 0.49,
"avg_cost": 471.399,
"avg_daily_short_volume": "2392820",
"close_price": 466.1,
"last_close_price": 472.1,
"timestamp": 1778169600000,
"timestamp_str": "2026-05-08"
}
]
}
}