顶尖交易员大户持仓多空比 (持仓)
接口描述
获取顶尖交易员大户的多空持仓比例。
HTTP请求
GET /futures/data/topLongShortPositionRatio
请求权重
1
请求参数
| 名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| symbol | STRING | YES | 交易对 |
| period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" |
| limit | INT | NO | 默认 30; 最大 500 |
| startTime | LONG | NO | 起始时间 |
| endTime | LONG | NO | 结束时间 |
响应示例
[
{
"symbol": "BTCUSDT",
"longShortRatio": "0.1979", // 多空比
"longAccount": "0.167854", // 多单占比
"shortAccount": "0.848243", // 空单占比
"timestamp": 1583127600000 // 时间戳
}
]
代码示例
cURL
curl -s "https://api-sepolia.ztdx.io/futures/data/topLongShortPositionRatio?symbol=BTCUSDT&period=1h&limit=5"
Python
import requests
base_url = "https://api.ztdx.io"
params = {"symbol": "BTCUSDT", "period": "1h", "limit": 5}
response = requests.get(f"{base_url}/futures/data/topLongShortPositionRatio", params=params)
for record in response.json():
print(f"{record['symbol']}: L/S={record['longShortRatio']} Long={record['longAccount']} Short={record['shortAccount']}")