Skip to main content

Taker Buy/Sell Volume

Description

Get taker buy/sell volume for trading pairs.

HTTP Request

GET /futures/data/takerlongshortRatio

Request Parameters

NameTypeRequiredDescription
symbolSTRINGYESTrading pair
periodENUMNO"5m","15m","30m","1h","2h","4h","6h","12h","1d"; Default "5m"
limitINTNODefault 30; Max 500
startTimeLONGNOAccepted but currently ignored
endTimeLONGNOAccepted but currently ignored

buyVol and sellVol are notional values in USD (sum of price × amount per bucket), not base asset quantities.

Response Example

[
{
"buySellRatio": "0.1979", // Taker buy/sell ratio
"sellVol": "848.243", // Taker sell notional volume (USD)
"buyVol": "167.854", // Taker buy notional volume (USD)
"timestamp": "1583127600000" // Timestamp (string)
}
]

Code Examples

cURL

curl -s "https://api.prex.world/futures/data/takerlongshortRatio?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/takerlongshortRatio", params=params)
for record in response.json():
print(f"Ratio={record['buySellRatio']} Buy={record['buyVol']} Sell={record['sellVol']}")