Bybit v5 market data: candles, 5-minute open interest and account ratios with cursor pagination, funding history and instrument specs.
Long/short account ratio for one Bybit derivatives contract.
/v1/finance:bybit/account-ratio30s cache7 paramschecking key…// npm i zpi-sdk
import { ZpiClient } from "zpi-sdk";
const client = new ZpiClient({ apiKey: "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" });
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
});
console.log(data);/v1/finance:bybit/account-ratioLong/short account ratio for one Bybit derivatives contract.
symbolstringrequiredcategoryenumoptionalperiodenumoptionalstartstringoptionalendstringoptionalcountnumberoptionalpagenumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/account-ratio?symbol=BTCUSDT&category=linear&period=5min&start=2020-07-20T00%3A00%3A00Z&end=2020-07-21T00%3A00%3A00Z&count=200&page=1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"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"
}/v1/finance:bybit/funding-historySettled funding rates for one Bybit perpetual.
symbolstringrequiredcategoryenumoptionalstartstringoptionalendstringoptionalcountnumberoptionalpagenumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/funding-history?symbol=BTCUSDT&category=linear&start=2024-01-01T00%3A00%3A00Z&end=2024-02-01T00%3A00%3A00Z&count=200&page=1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 200,
"items": [
{
"date": "2026-06-16T16:00:00.000Z",
"time": 1781625600000,
"symbol": "BTCUSDT",
"fundingRate": 0.00004902
},
{
"date": "2026-06-17T00:00:00.000Z",
"time": 1781654400000,
"symbol": "BTCUSDT",
"fundingRate": 0.00005459
},
{
"date": "2026-06-17T08:00:00.000Z",
"time": 1781683200000,
"symbol": "BTCUSDT",
"fundingRate": 0.00001567
},
{
"date": "2026-06-17T16:00:00.000Z",
"time": 1781712000000,
"symbol": "BTCUSDT",
"fundingRate": 0.0000036
},
{
"date": "2026-06-18T00:00:00.000Z",
"time": 1781740800000,
"symbol": "BTCUSDT",
"fundingRate": -0.00000327
},
{
"date": "2026-06-18T08:00:00.000Z",
"time": 1781769600000,
"symbol": "BTCUSDT",
"fundingRate": -0.00001297
},
{
"date": "2026-06-18T16:00:00.000Z",
"time": 1781798400000,
"symbol": "BTCUSDT",
"fundingRate": -0.00002986
},
{
"date": "2026-06-19T00:00:00.000Z",
"time": 1781827200000,
"symbol": "BTCUSDT",
"fundingRate": -0.0000469
}
],
"symbol": "BTCUSDT",
"dataset": "funding-history",
"hasMore": true,
"category": "linear",
"nextPage": 2,
"provider": "bybit"
}/v1/finance:bybit/index-price-klineIndex-price candles for one Bybit derivatives contract.
symbolstringrequiredcategoryenumoptionalintervalenumoptionalstartstringoptionalendstringoptionalcountnumberoptionalpagenumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/index-price-kline?symbol=BTCUSDT&category=linear&interval=5&start=2024-01-01T00%3A00%3A00Z&end=2024-01-02T00%3A00%3A00Z&count=200&page=1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 200,
"items": [
{
"low": 76551.94,
"date": "2026-08-21T14:15:00.000Z",
"high": 76969,
"open": 76766.15,
"close": 76662.95,
"openTime": 1787321700000,
"closeTime": 1787321999999
},
{
"low": 76552.24,
"date": "2026-08-21T14:20:00.000Z",
"high": 77088.57,
"open": 76662.95,
"close": 77023.18,
"openTime": 1787322000000,
"closeTime": 1787322299999
},
{
"low": 76997.76,
"date": "2026-08-21T14:25:00.000Z",
"high": 77199.27,
"open": 77023.18,
"close": 77064.48,
"openTime": 1787322300000,
"closeTime": 1787322599999
},
{
"low": 77060.76,
"date": "2026-08-21T14:30:00.000Z",
"high": 77223.69,
"open": 77064.48,
"close": 77095.41,
"openTime": 1787322600000,
"closeTime": 1787322899999
},
{
"low": 76858.2,
"date": "2026-08-21T14:35:00.000Z",
"high": 77237.6,
"open": 77095.41,
"close": 76864.36,
"openTime": 1787322900000,
"closeTime": 1787323199999
},
{
"low": 76861.61,
"date": "2026-08-21T14:40:00.000Z",
"high": 77146.97,
"open": 76864.36,
"close": 77143.94,
"openTime": 1787323200000,
"closeTime": 1787323499999
},
{
"low": 77121.32,
"date": "2026-08-21T14:45:00.000Z",
"high": 77365.53,
"open": 77143.94,
"close": 77342.6,
"openTime": 1787323500000,
"closeTime": 1787323799999
},
{
"low": 77295.4,
"date": "2026-08-21T14:50:00.000Z",
"high": 77439.05,
"open": 77342.6,
"close": 77303.98,
"openTime": 1787323800000,
"closeTime": 1787324099999
}
],
"symbol": "BTCUSDT",
"dataset": "index-price-kline",
"hasMore": true,
"category": "linear",
"interval": "5",
"nextPage": 2,
"provider": "bybit"
}/v1/finance:bybit/instruments-infoContract specifications: tick size, lot size, leverage, minimum notional.
categoryenumoptionalsymbolstringoptionalbaseCoinstringoptionalstatusenumoptionalcountnumberoptionalpagenumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/instruments-info?category=linear&symbol=BTCUSDT&baseCoin=BTC&status=Trading&count=500&page=1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 500,
"items": [
{
"status": "Trading",
"symbol": "0GUSDT",
"qtyStep": 0.1,
"baseCoin": "0G",
"maxPrice": 1999.9998,
"minPrice": 0.0001,
"tickSize": 0.0001,
"quoteCoin": "USDT",
"launchDate": "2025-09-18T06:08:56.000Z",
"launchTime": 1758175736000,
"priceScale": 4,
"settleCoin": "USDT",
"copyTrading": "both",
"maxLeverage": 50,
"maxOrderQty": 350000,
"minLeverage": 1,
"minOrderQty": 0.1,
"contractType": "LinearPerpetual",
"leverageStep": 0.01,
"minNotionalValue": 5,
"unifiedMarginTrade": true,
"fundingIntervalMinutes": 240
},
{
"status": "Trading",
"symbol": "1000000BABYDOGEUSDT",
"qtyStep": 100,
"baseCoin": "1000000BABYDOGE",
"maxPrice": 1.9999998,
"minPrice": 1e-7,
"tickSize": 1e-7,
"quoteCoin": "USDT",
"launchDate": "2024-06-11T11:34:12.000Z",
"launchTime": 1718105652000,
"priceScale": 7,
"settleCoin": "USDT",
"copyTrading": "both",
"maxLeverage": 25,
"maxOrderQty": 220000000,
"minLeverage": 1,
"minOrderQty": 100,
"contractType": "LinearPerpetual",
"leverageStep": 0.01,
"minNotionalValue": 5,
"unifiedMarginTrade": true,
"fundingIntervalMinutes": 240
}
],
"symbol": null,
"dataset": "instruments-info",
"hasMore": true,
"baseCoin": null,
"category": "linear",
"nextPage": 2,
"provider": "bybit"
}/v1/finance:bybit/klineOHLCV candles for one Bybit spot or derivatives symbol.
symbolstringrequiredcategoryenumoptionalintervalenumoptionalstartstringoptionalendstringoptionalcountnumberoptionalpagenumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/kline?symbol=BTCUSDT&category=linear&interval=5&start=2020-03-26T00%3A00%3A00Z&end=2020-03-27T00%3A00%3A00Z&count=200&page=1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 200,
"items": [
{
"low": 76535.3,
"date": "2026-08-21T14:15:00.000Z",
"high": 76968.9,
"open": 76762.3,
"close": 76662.9,
"volume": 571.511,
"openTime": 1787321700000,
"turnover": 43857483.1506,
"closeTime": 1787321999999
},
{
"low": 76544,
"date": "2026-08-21T14:20:00.000Z",
"high": 77094.2,
"open": 76662.9,
"close": 77012.4,
"volume": 950.169,
"openTime": 1787322000000,
"turnover": 73025640.7736,
"closeTime": 1787322299999
},
{
"low": 76979.6,
"date": "2026-08-21T14:25:00.000Z",
"high": 77215.7,
"open": 77012.4,
"close": 77057.9,
"volume": 451.086,
"openTime": 1787322300000,
"turnover": 34779300.3926,
"closeTime": 1787322599999
}
],
"symbol": "BTCUSDT",
"dataset": "kline",
"hasMore": true,
"category": "linear",
"interval": "5",
"nextPage": 2,
"provider": "bybit"
}/v1/finance:bybit/mark-price-klineMark-price candles for one Bybit derivatives contract.
symbolstringrequiredcategoryenumoptionalintervalenumoptionalstartstringoptionalendstringoptionalcountnumberoptionalpagenumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/mark-price-kline?symbol=BTCUSDT&category=linear&interval=5&start=2024-01-01T00%3A00%3A00Z&end=2024-01-02T00%3A00%3A00Z&count=200&page=1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 200,
"items": [
{
"low": 76549.86,
"date": "2026-08-21T14:15:00.000Z",
"high": 76952.7,
"open": 76762.4,
"close": 76661.02,
"openTime": 1787321700000,
"closeTime": 1787321999999
},
{
"low": 76553.34,
"date": "2026-08-21T14:20:00.000Z",
"high": 77090.5,
"open": 76661.02,
"close": 77023.13,
"openTime": 1787322000000,
"closeTime": 1787322299999
},
{
"low": 76996.67,
"date": "2026-08-21T14:25:00.000Z",
"high": 77185.03,
"open": 77023.13,
"close": 77060.69,
"openTime": 1787322300000,
"closeTime": 1787322599999
},
{
"low": 77058.8,
"date": "2026-08-21T14:30:00.000Z",
"high": 77225.06,
"open": 77060.69,
"close": 77090.06,
"openTime": 1787322600000,
"closeTime": 1787322899999
},
{
"low": 76855.1,
"date": "2026-08-21T14:35:00.000Z",
"high": 77233.3,
"open": 77090.06,
"close": 76862.9,
"openTime": 1787322900000,
"closeTime": 1787323199999
},
{
"low": 76855.1,
"date": "2026-08-21T14:40:00.000Z",
"high": 77145.77,
"open": 76862.9,
"close": 77145.77,
"openTime": 1787323200000,
"closeTime": 1787323499999
},
{
"low": 77123.25,
"date": "2026-08-21T14:45:00.000Z",
"high": 77366.91,
"open": 77145.77,
"close": 77345.3,
"openTime": 1787323500000,
"closeTime": 1787323799999
},
{
"low": 77296.48,
"date": "2026-08-21T14:50:00.000Z",
"high": 77443.34,
"open": 77345.3,
"close": 77308.42,
"openTime": 1787323800000,
"closeTime": 1787324099999
}
],
"symbol": "BTCUSDT",
"dataset": "mark-price-kline",
"hasMore": true,
"category": "linear",
"interval": "5",
"nextPage": 2,
"provider": "bybit"
}/v1/finance:bybit/open-interestOpen-interest series for one Bybit derivatives contract, down to five minutes.
symbolstringrequiredcategoryenumoptionalintervalTimeenumoptionalstartstringoptionalendstringoptionalcountnumberoptionalpagenumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/open-interest?symbol=BTCUSDT&category=linear&intervalTime=5min&start=2021-01-01T00%3A00%3A00Z&end=2021-01-02T00%3A00%3A00Z&count=200&page=1" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 200,
"items": [
{
"date": "2026-08-21T14:15:00.000Z",
"time": 1787321700000,
"openInterest": 49825.159,
"singleOpenInterest": 24912.58
},
{
"date": "2026-08-21T14:20:00.000Z",
"time": 1787322000000,
"openInterest": 49904.981,
"singleOpenInterest": 24952.491
},
{
"date": "2026-08-21T14:25:00.000Z",
"time": 1787322300000,
"openInterest": 49950.202,
"singleOpenInterest": 24975.101
},
{
"date": "2026-08-21T14:30:00.000Z",
"time": 1787322600000,
"openInterest": 49894.376,
"singleOpenInterest": 24947.188
},
{
"date": "2026-08-21T14:35:00.000Z",
"time": 1787322900000,
"openInterest": 49893.606,
"singleOpenInterest": 24946.803
},
{
"date": "2026-08-21T14:40:00.000Z",
"time": 1787323200000,
"openInterest": 49727.085,
"singleOpenInterest": 24863.543
},
{
"date": "2026-08-21T14:45:00.000Z",
"time": 1787323500000,
"openInterest": 49747.449,
"singleOpenInterest": 24873.725
},
{
"date": "2026-08-21T14:50:00.000Z",
"time": 1787323800000,
"openInterest": 49773.817,
"singleOpenInterest": 24886.909
}
],
"symbol": "BTCUSDT",
"dataset": "open-interest",
"hasMore": true,
"category": "linear",
"nextPage": 2,
"provider": "bybit",
"intervalTime": "5min"
}/v1/finance:bybit/orderbookOrder-book snapshot for one Bybit symbol.
symbolstringrequiredcategoryenumoptionalcountnumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/orderbook?symbol=BTCUSDT&category=linear&count=50" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"asks": [
{
"size": 0.009,
"price": 77505.3
},
{
"size": 0.001,
"price": 77505.4
},
{
"size": 0.001,
"price": 77506
},
{
"size": 0.071,
"price": 77506.7
},
{
"size": 0.002,
"price": 77507
},
{
"size": 0.001,
"price": 77508.9
},
{
"size": 0.001,
"price": 77510.4
},
{
"size": 0.002,
"price": 77510.5
}
],
"bids": [
{
"size": 5.51,
"price": 77505.2
},
{
"size": 0.001,
"price": 77505.1
},
{
"size": 0.565,
"price": 77504.8
},
{
"size": 0.287,
"price": 77504.5
},
{
"size": 0.433,
"price": 77504.1
},
{
"size": 0.288,
"price": 77504
},
{
"size": 0.002,
"price": 77503.8
},
{
"size": 0.432,
"price": 77503.7
}
],
"date": "2026-08-22T06:51:01.405Z",
"time": 1787381461405,
"symbol": "BTCUSDT",
"dataset": "orderbook",
"askCount": 50,
"bidCount": 50,
"category": "linear",
"provider": "bybit",
"sequence": 786674036292,
"updateId": 12964032,
"matchTime": 1787381461404
}/v1/finance:bybit/recent-tradePublic prints for one Bybit symbol, newest first.
symbolstringrequiredcategoryenumoptionalbaseCoinstringoptionalcountnumberoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/recent-trade?symbol=BTCUSDT&category=linear&baseCoin=BTC&count=100" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"count": 100,
"items": [
{
"date": "2026-08-22T06:51:00.881Z",
"side": "sell",
"size": 0.001,
"time": 1787381460881,
"price": 77501,
"symbol": "BTCUSDT",
"tradeId": "2c89e68c-fb52-5c18-8b88-5220608dc058",
"sequence": 786674002571,
"isRpiTrade": false,
"isBlockTrade": false
},
{
"date": "2026-08-22T06:51:00.881Z",
"side": "sell",
"size": 0.001,
"time": 1787381460881,
"price": 77501.1,
"symbol": "BTCUSDT",
"tradeId": "98100331-249f-5bcd-9d63-b74b03aed3bc",
"sequence": 786674002571,
"isRpiTrade": false,
"isBlockTrade": false
},
{
"date": "2026-08-22T06:51:00.881Z",
"side": "sell",
"size": 0.001,
"time": 1787381460881,
"price": 77501.1,
"symbol": "BTCUSDT",
"tradeId": "5511e988-a85a-59ed-843c-5b358bf46ab9",
"sequence": 786674002571,
"isRpiTrade": false,
"isBlockTrade": false
}
],
"symbol": "BTCUSDT",
"dataset": "recent-trade",
"category": "linear",
"provider": "bybit"
}/v1/finance:bybit/tickers24h statistics for every Bybit symbol in one product line, or for one symbol.
categoryenumoptionalsymbolstringoptionalbaseCoinstringoptionalexpDatestringoptionalcurl -X GET "https://api.zapi.ink/v1/finance:bybit/tickers?category=linear&symbol=BTCUSDT&baseCoin=BTC&expDate=25DEC26" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"count": 837,
"items": [
{
"symbol": "0GUSDT",
"askSize": 387.8,
"bidSize": 385.9,
"askPrice": 0.1687,
"bidPrice": 0.1686,
"lastPrice": 0.1687,
"markPrice": 0.1687,
"volume24h": 13622457.9,
"indexPrice": 0.1686,
"fundingRate": 0.00005,
"lowPrice24h": 0.1415,
"prevPrice1h": 0.1673,
"turnover24h": 2302180.649,
"highPrice24h": 0.1891,
"openInterest": 10957531.4,
"prevPrice24h": 0.1641,
"nextFundingDate": "2026-08-22T08:00:00.000Z",
"nextFundingTime": 1787385600000,
"openInterestValue": 1848535.55,
"priceChangePct24h": 0.028031
},
{
"symbol": "1000000BABYDOGEUSDT",
"askSize": 390300,
"bidSize": 165200,
"askPrice": 0.0003929,
"bidPrice": 0.0003927,
"lastPrice": 0.000393,
"markPrice": 0.0003925,
"volume24h": 3443243800,
"indexPrice": 0.0003918,
"fundingRate": 0.00005,
"lowPrice24h": 0.0003689,
"prevPrice1h": 0.0003946,
"turnover24h": 1345216.6154,
"highPrice24h": 0.0004229,
"openInterest": 1236552200,
"prevPrice24h": 0.0003735,
"nextFundingDate": "2026-08-22T08:00:00.000Z",
"nextFundingTime": 1787385600000,
"openInterestValue": 485346.74,
"priceChangePct24h": 0.052208
},
{
"symbol": "1000000MOGUSDT",
"askSize": 2193,
"bidSize": 4930,
"askPrice": 0.1227,
"bidPrice": 0.1225,
"lastPrice": 0.1227,
"markPrice": 0.12261,
"volume24h": 19550740,
"indexPrice": 0.12184,
"fundingRate": 0.00043828,
"lowPrice24h": 0.1183,
"prevPrice1h": 0.1225,
"turnover24h": 2460836.7394,
"highPrice24h": 0.1367,
"openInterest": 9500852,
"prevPrice24h": 0.1186,
"nextFundingDate": "2026-08-22T08:00:00.000Z",
"nextFundingTime": 1787385600000,
"openInterestValue": 1164899.46,
"priceChangePct24h": 0.034569
}
],
"symbol": null,
"dataset": "tickers",
"baseCoin": null,
"category": "linear",
"provider": "bybit"
}