Skip to main content

Long/Short Ratio

Top-trader long/short ratios. Four endpoints share this page.

EndpointSourceNotes
GET /topLongShortPositionRatio/futures/data/topLongShortPositionRatioPosition-weighted, query symbol required.
GET /topLongShortAccountRatio/futures/data/topLongShortAccountRatioAccount-weighted, query symbol required.
GET /long-short/position-ratio/{symbol}platform Binance clientPosition-weighted, symbol in path.
GET /long-short/account-ratio/{symbol}platform Binance clientAccount-weighted, symbol in path.

All four share the same query/path parameter set beyond symbol placement and the same response shape.

Common parameters

NameInTypeRequiredDefaultNotes
symbolquery (top-…) / path (long-short/…)stringYesUppercase futures symbol.
periodquerystringNo5mOne of 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d.
limitqueryintegerNo10Max 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

HTTPCause
422Missing symbol (/topLongShort* variants).
502Upstream 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"