Bybit

Bybit v5 market data: candles, 5-minute open interest and account ratios with cursor pagination, funding history and instrument specs.

11 endpoints22.4k calls11/11 passing
Get API key

Long/short account ratio for one Bybit derivatives contract.

GET/v1/…bybit/account-ratio
passing · 0.2s30s cache

Try it

Checking your keys…

Parameters

symbol

string · query · required

Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt.

category

enum · query · optional

Product line. The ratio is published for derivatives only.

period

enum · query · optional

Sampling interval. Default 5min.

start

string · query · optional

Oldest point to include. Epoch ms/s or ISO date.

end

string · query · optional

Newest point to include. Epoch ms/s or ISO date.

count

number · query · optional

Points per page. Default 200, max 500.

page

number · query · optional

Page number. Default 1, max 20.

Example response

{"project":"finance:bybit",  "data": {"page":1,"count":200,    "items": [      {"date":"2026-08-21T14:15:00.000Z","time":1787321700000,"longRatio":0.541,"shortRatio":0.459      },      {"date":"2026-08-21T14:20:00.000Z","time":1787322000000,"longRatio":0.5405,"shortRatio":0.4595      },      {"date":"2026-08-21T14:25:00.000Z","time":1787322300000,"longRatio":0.5394,"shortRatio":0.4606      },      {"date":"2026-08-21T14:30:00.000Z","time":1787322600000,"longRatio":0.5403,"shortRatio":0.4597      },      {"date":"2026-08-21T14:35:00.000Z","time":1787322900000,"longRatio":0.541,"shortRatio":0.459      },      {"date":"2026-08-21T14:40:00.000Z","time":1787323200000,"longRatio":0.541,"shortRatio":0.459      },      {"date":"2026-08-21T14:45:00.000Z","time":1787323500000,"longRatio":0.5405,"shortRatio":0.4595      },      {"date":"2026-08-21T14:50:00.000Z","time":1787323800000,"longRatio":0.5414,"shortRatio":0.4586      }    ],"period":"5min","symbol":"BTCUSDT","dataset":"account-ratio","hasMore":true,"category":"linear","nextPage":2,"provider":"bybit"  },"timestamp":"2026-08-20T14:56:32Z"}

Errors

  • 401Missing or invalid x-api-key
  • 404Not found or private
  • 429Rate limit or monthly quota reached

Code

const data = await client.run(  "finance:bybit",  "account-ratio",  { symbol: "BTCUSDT", category: "linear", period: "5min", start: "2020-07-20T00:00:00Z", end: "2020-07-21T00:00:00Z", count: 200, page: 1 });