Long/Short Ratio
Top-trader long/short ratios. Four endpoints share this page.
| Endpoint | Source | Notes |
|---|---|---|
GET /topLongShortPositionRatio | /futures/data/topLongShortPositionRatio | Position-weighted, query symbol required. |
GET /topLongShortAccountRatio | /futures/data/topLongShortAccountRatio | Account-weighted, query symbol required. |
GET /long-short/position-ratio/{symbol} | platform Binance client | Position-weighted, symbol in path. |
GET /long-short/account-ratio/{symbol} | platform Binance client | Account-weighted, symbol in path. |
All four share the same query/path parameter set beyond symbol placement and the same response shape.
Common parameters
| Name | In | Type | Required | Default | Notes |
|---|---|---|---|---|---|
symbol | query (top-…) / path (long-short/…) | string | Yes | — | Uppercase futures symbol. |
period | query | string | No | 5m | One of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d. |
limit | query | integer | No | 10 | Max per Binance is 500. |
Response — 200 OK
Array, Binance shape:
[
{
"symbol": "BTCUSDT",
"longShortRatio": "1.4321",
"longAccount": "0.5876",
"shortAccount": "0.4124",
"timestamp": 1745920800000
}
]
(Field names longAccount/shortAccount apply on the account-ratio endpoints; the position-ratio endpoints return longPosition/shortPosition.)
Errors
| HTTP | Cause |
|---|---|
422 | Missing symbol (/topLongShort* variants). |
502 | Upstream Binance request failed. |
Examples
# Position-weighted, query symbol
curl -s "https://api.pipai.org/topLongShortPositionRatio?symbol=BTCUSDT&period=1h&limit=24"
# Account-weighted, path symbol
curl -s "https://api.pipai.org/long-short/account-ratio/BTCUSDT?period=1h&limit=24"