跳到主要内容

顶尖交易员大户持仓多空比 (持仓)

接口描述

获取顶尖交易员大户的多空持仓比例。

HTTP请求

GET /futures/data/topLongShortPositionRatio

请求权重

1

请求参数

名称类型是否必需描述
symbolSTRINGYES交易对
periodENUMYES"5m","15m","30m","1h","2h","4h","6h","12h","1d"
limitINTNO默认 30; 最大 500
startTimeLONGNO起始时间
endTimeLONGNO结束时间

响应示例

[
{
"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']}")