跳到主要内容

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

接口描述

获取顶尖交易员大户(按持仓规模排名前 20% 的账户)的多空账户比例。

该接口返回的是单条当前快照(只含一个元素的数组),而不是历史序列。periodlimitstartTimeendTime 参数已接受但当前忽略。

HTTP请求

GET /futures/data/topLongShortAccountRatio

请求参数

名称类型是否必需描述
symbolSTRINGYES交易对
periodENUMNO已接受但当前忽略
limitINTNO已接受但当前忽略
startTimeLONGNO已接受但当前忽略
endTimeLONGNO已接受但当前忽略

响应示例

[
{
"symbol": "BTCUSDT",
"longShortRatio": "0.1979", // 多空比
"longAccount": "0.167854", // 多单账户占比
"shortAccount": "0.848243", // 空单账户占比
"timestamp": "1583127600000" // 时间戳(字符串)
}
]

代码示例

cURL

curl -s "https://api.prex.world/futures/data/topLongShortAccountRatio?symbol=BTCUSDT&period=1h&limit=5"

Python

import requests

base_url = "https://api.prex.world"
params = {"symbol": "BTCUSDT", "period": "1h", "limit": 5}
response = requests.get(f"{base_url}/futures/data/topLongShortAccountRatio", params=params)
for record in response.json():
print(f"{record['symbol']}: L/S={record['longShortRatio']} Long={record['longAccount']} Short={record['shortAccount']}")