Skip to main content

Top Trader Long/Short Ratio (Positions)

Description

Get the long/short position ratio of top traders (top 20% of traders by position notional value).

This endpoint returns a single current snapshot (an array with one element), not a historical series. The period, limit, startTime, and endTime parameters are accepted but currently ignored.

HTTP Request

GET /futures/data/topLongShortPositionRatio

Request Parameters

NameTypeRequiredDescription
symbolSTRINGYESTrading pair
periodENUMNOAccepted but currently ignored
limitINTNOAccepted but currently ignored
startTimeLONGNOAccepted but currently ignored
endTimeLONGNOAccepted but currently ignored

Response Example

[
{
"symbol": "BTCUSDT",
"longShortRatio": "0.1979", // Long/short ratio
"longAccount": "0.167854", // Long position ratio
"shortAccount": "0.848243", // Short position ratio
"timestamp": "1583127600000" // Timestamp (string)
}
]

Code Examples

cURL

curl -s "https://api.prex.world/futures/data/topLongShortPositionRatio?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/topLongShortPositionRatio", params=params)
for record in response.json():
print(f"{record['symbol']}: L/S={record['longShortRatio']} Long={record['longAccount']} Short={record['shortAccount']}")