Skip to main content

Get Long Short Ratio

This refers to the net long and short positions as percentages of all position holders during the selected time.
Long account ratio = Number of holders with long positions / Total number of holders
Short account ratio = Number of holders with short positions / Total number of holders
Long-short account ratio = Long account ratio / Short account ratio

HTTP Request

GET /v5/market/account-ratio

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type. linear(USDT Contract),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 the number of long position
> sellRatiostringThe ratio of the number of 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
}