跳到主要内容

多空比

大户多空比。本页合并四个端点。

端点来源说明
GET /topLongShortPositionRatio/futures/data/topLongShortPositionRatio按持仓量加权;symbol 通过查询参数传入。
GET /topLongShortAccountRatio/futures/data/topLongShortAccountRatio按账户数加权;symbol 通过查询参数传入。
GET /long-short/position-ratio/{symbol}platform Binance client按持仓量加权;symbol 通过路径参数传入。
GET /long-short/account-ratio/{symbol}platform Binance client按账户数加权;symbol 通过路径参数传入。

symbol 的位置之外,四个端点的参数集合与响应结构完全相同。

通用参数

参数位置类型必填默认值说明
symbolquery(top-… 系列)/ path(long-short/… 系列)string大写永续合约符号。
periodquerystring5m5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d 之一。
limitqueryinteger10Binance 最大 500。

响应 — 200 OK

数组(Binance 结构):

[
{
"symbol": "BTCUSDT",
"longShortRatio": "1.4321",
"longAccount": "0.5876",
"shortAccount": "0.4124",
"timestamp": 1745920800000
}
]

longAccount/shortAccount 字段适用于 account-ratio 端点;position-ratio 端点返回 longPosition/shortPosition。)

错误

HTTP触发原因
422缺少 symbol(仅 /topLongShort* 变体)。
502上游 Binance 请求失败。

示例

# 按持仓量加权,symbol 走查询参数
curl -s "https://api.pipai.org/topLongShortPositionRatio?symbol=BTCUSDT&period=1h&limit=24"

# 按账户数加权,symbol 走路径参数
curl -s "https://api.pipai.org/long-short/account-ratio/BTCUSDT?period=1h&limit=24"