Skip to main content

Get Long/Short Account Ratio

Get the ratio of accounts holding long versus short positions for a futures symbol over a specified time period.

HTTP Request

GET /api/v1/future/market/account-long-short

Request Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol (e.g., BTCUSDT)
periodstringYesTime period: "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h", "1d"

Request Example

curl -X GET "https://open-api.bydoxe.com/api/v1/future/market/account-long-short?symbol=BTCUSDT&period=1h"

Response Parameters

ParameterTypeDescription
codestringResponse code
msgstringResponse message
requestTimenumberRequest timestamp in milliseconds
dataarrayArray of long/short account ratio data
> longAccountRatiostringPercentage of accounts holding long positions
> shortAccountRatiostringPercentage of accounts holding short positions
> longShortAccountRatiostringRatio of long accounts to short accounts
> tsstringTimestamp in milliseconds (Unix timestamp)

Response Example

Success Response

{
"code": "00000",
"msg": "success",
"requestTime": 1732000000000,
"data": [
{
"longAccountRatio": "0.51",
"shortAccountRatio": "0.49",
"longShortAccountRatio": "1.04",
"ts": "1732000123456"
}
]
}

Error Codes

CodeMessage
40034symbol does not exist
40034period does not exist
50010Upstream response invalid