Skip to main content

Get Long Short Ratio

HTTP Request

GET /v5/market/account-ratio

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type. linear(USDT Perpetual),inverse
symboltruestringSymbol name, like BTCUSDT, uppercase only
periodtruestringData recording period. 5min, 15min, 30min, 1h, 4h, 1d
startTimefalsestringThe start timestamp (ms)
endTimefalsestringThe end timestamp (ms)
limitfalseintegerLimit for data size per page. [1, 500]. Default: 50
cursorfalsestringCursor. Use the nextPageCursor token from the response to retrieve the next page of the result set

Response Parameters

ParameterTypeComments
listarrayObject
> symbolstringSymbol name
> buyRatiostringThe ratio of users with net long position
> sellRatiostringThe ratio of users with net short position
> timestampstringTimestamp (ms)
nextPageCursorstringRefer to the cursor request parameter

Request Example

GET /v5/market/account-ratio?category=linear&symbol=BTCUSDT&period=1h&limit=2&startTime=1696089600000&endTime=1696262400000 HTTP/1.1
Host: api-testnet.bybit.com

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"symbol": "BTCUSDT",
"buyRatio": "0.49",
"sellRatio": "0.51",
"timestamp": "1696262400000"
},
{
"symbol": "BTCUSDT",
"buyRatio": "0.4927",
"sellRatio": "0.5073",
"timestamp": "1696258800000"
}
],
"nextPageCursor": "lastid%3D0%26lasttime%3D1696258800"
},
"retExtInfo": {},
"time": 1731567491688
}