# Bybit โ€” Zapi reference > Bybit v5 market data: candles, 5-minute open interest and account ratios with cursor pagination, funding history and instrument specs. **Base URL:** `https://api.zapi.ink` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zapi.ink/dashboard/keys. **Response envelope:** `{ content, message, errors }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zapi.ink/api/finance/bybit - Endpoint catalog: https://zapi.ink/category/finance - Concise index: https://zapi.ink/llms.txt - Full reference: https://zapi.ink/llms-full.txt --- ## Bybit **Category:** finance ยท **Slug:** `bybit` **Detail page:** https://zapi.ink/api/finance/bybit Bybit v5 market data: candles, 5-minute open interest and account ratios with cursor pagination, funding history and instrument specs. **Tags:** bybit, crypto, derivatives, open-interest, funding, klines ### Account Ratio Long/short account ratio for one Bybit derivatives contract. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/account-ratio` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse) | query | no | Product line. The ratio is published for derivatives only | | `period` | enum(5min|15min|30min|1h|4h|1d) | query | no | Sampling interval. Default 5min | | `start` | string | query | no | Oldest point to include. Epoch ms/s or ISO date | | `end` | string | query | no | Newest point to include. Epoch ms/s or ISO date | | `count` | number | query | no | Points per page. Default 200, max 500 | | `page` | number | query | no | Page number. Default 1, max 20 | **cURL:** ```bash curl "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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("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", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.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", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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" } ``` --- ### Funding History Settled funding rates for one Bybit perpetual. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/funding-history` - **Cache TTL:** 60s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse) | query | no | Product line. Funding applies to perpetuals only | | `start` | string | query | no | Oldest settlement to include. Epoch ms/s or ISO date | | `end` | string | query | no | Newest settlement to include. Epoch ms/s or ISO date | | `count` | number | query | no | Settlements per page. Default 200, max 200 | | `page` | number | query | no | Page number, walking backwards in time. Default 1, max 20 | **cURL:** ```bash curl "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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("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", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.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", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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" } ``` --- ### Index Price Kline Index-price candles for one Bybit derivatives contract. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/index-price-kline` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse) | query | no | Product line. Default linear | | `interval` | enum(1|3|5|15|30|60|120|240|360|720|D|W|M) | query | no | Candle size in minutes, or D/W/M. Default 5 | | `start` | string | query | no | Oldest candle to include. Epoch ms/s or ISO date | | `end` | string | query | no | Newest candle to include. Epoch ms/s or ISO date | | `count` | number | query | no | Candles per page. Default 200, max 1000 | | `page` | number | query | no | Page number, walking backwards in time. Default 1, max 20 | **cURL:** ```bash curl "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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("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", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.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", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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" } ``` --- ### Instruments Info Contract specifications: tick size, lot size, leverage, minimum notional. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/instruments-info` - **Cache TTL:** 600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `category` | enum(linear|inverse|spot|option) | query | no | Product line. Default linear | | `symbol` | string | query | no | One symbol. Omit to list the whole product line | | `baseCoin` | string | query | no | Filter by base coin | | `status` | enum(Trading|PreLaunch|Delivering|Closed) | query | no | Filter by contract status | | `count` | number | query | no | Instruments per page. Default 500, max 1000 | | `page` | number | query | no | Page number. Default 1, max 20 | **cURL:** ```bash curl "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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zapi.ink/v1/finance:bybit/instruments-info?category=linear&symbol=BTCUSDT&baseCoin=BTC&status=Trading&count=500&page=1", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zapi.ink/v1/finance:bybit/instruments-info?category=linear&symbol=BTCUSDT&baseCoin=BTC&status=Trading&count=500&page=1", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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 }, { "status": "Trading", "symbol": "1000000MOGUSDT", "qtyStep": 1, "baseCoin": "1000000MOG", "maxPrice": 1999.9998, "minPrice": 0.0001, "tickSize": 0.0001, "quoteCoin": "USDT", "launchDate": "2024-05-16T15:43:33.000Z", "launchTime": 1715874213000, "priceScale": 5, "settleCoin": "USDT", "copyTrading": "both", "maxLeverage": 50, "maxOrderQty": 1500000, "minLeverage": 1, "minOrderQty": 1, "contractType": "LinearPerpetual", "leverageStep": 0.01, "minNotionalValue": 5, "unifiedMarginTrade": true, "fundingIntervalMinutes": 240 }, { "status": "Trading", "symbol": "10000NEXUSDT", "qtyStep": 10, "baseCoin": "10000NEX", "maxPrice": 199.99998, "minPrice": 0.00001, "tickSize": 0.00001, "quoteCoin": "USDT", "launchDate": "2026-05-21T07:57:22.000Z", "launchTime": 1779350242000, "priceScale": 5, "settleCoin": "USDT", "copyTrading": "none", "maxLeverage": 10, "maxOrderQty": 3600000, "minLeverage": 1, "minOrderQty": 10, "contractType": "LinearPerpetual", "leverageStep": 0.01, "minNotionalValue": 5, "unifiedMarginTrade": true, "fundingIntervalMinutes": 240 }, { "status": "Trading", "symbol": "10000SATSUSDT", "qtyStep": 100, "baseCoin": "10000SATS", "maxPrice": 0.19999998, "minPrice": 1e-8, "tickSize": 1e-8, "quoteCoin": "USDT", "launchDate": "2023-11-16T09:41:35.000Z", "launchTime": 1700127695000, "priceScale": 8, "settleCoin": "USDT", "copyTrading": "both", "maxLeverage": 12.5, "maxOrderQty": 410000000, "minLeverage": 1, "minOrderQty": 100, "contractType": "LinearPerpetual", "leverageStep": 0.01, "minNotionalValue": 5, "unifiedMarginTrade": true, "fundingIntervalMinutes": 240 }, { "status": "Trading", "symbol": "1000BONKPERP", "qtyStep": 10, "baseCoin": "1000BONK", "maxPrice": 19.999998, "minPrice": 0.000001, "tickSize": 0.000001, "quoteCoin": "USDC", "launchDate": "2024-11-28T08:42:56.000Z", "launchTime": 1732783376000, "priceScale": 6, "settleCoin": "USDC", "copyTrading": "none", "maxLeverage": 75, "maxOrderQty": 5500000, "minLeverage": 1, "minOrderQty": 10, "contractType": "LinearPerpetual", "leverageStep": 0.01, "minNotionalValue": 5, "unifiedMarginTrade": true, "fundingIntervalMinutes": 480 }, { "status": "Trading", "symbol": "1000BONKUSDT", "qtyStep": 100, "baseCoin": "1000BONK", "maxPrice": 19.999998, "minPrice": 0.000001, "tickSize": 0.000001, "quoteCoin": "USDT", "launchDate": "2023-01-06T02:10:39.000Z", "launchTime": 1672971039000, "priceScale": 7, "settleCoin": "USDT", "copyTrading": "both", "maxLeverage": 50, "maxOrderQty": 60000000, "minLeverage": 1, "minOrderQty": 100, "contractType": "LinearPerpetual", "leverageStep": 0.01, "minNotionalValue": 5, "unifiedMarginTrade": true, "fundingIntervalMinutes": 240 }, { "status": "Trading", "symbol": "1000BTTUSDT", "qtyStep": 100, "baseCoin": "1000BTT", "maxPrice": 1.9999998, "minPrice": 1e-7, "tickSize": 1e-7, "quoteCoin": "USDT", "launchDate": "2022-02-25T06:08:18.000Z", "launchTime": 1645769298000, "priceScale": 7, "settleCoin": "USDT", "copyTrading": "none", "maxLeverage": 12.5, "maxOrderQty": 60000000, "minLeverage": 1, "minOrderQty": 100, "contractType": "LinearPerpetual", "leverageStep": 0.01, "minNotionalValue": 5, "unifiedMarginTrade": true, "fundingIntervalMinutes": 480 } ], "symbol": null, "dataset": "instruments-info", "hasMore": true, "baseCoin": null, "category": "linear", "nextPage": 2, "provider": "bybit" } ``` --- ### Kline OHLCV candles for one Bybit spot or derivatives symbol. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/kline` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse|spot) | query | no | Product line. Default linear | | `interval` | enum(1|3|5|15|30|60|120|240|360|720|D|W|M) | query | no | Candle size in minutes, or D/W/M. Default 5 | | `start` | string | query | no | Oldest candle to include. Epoch ms/s or ISO date | | `end` | string | query | no | Newest candle to include. Epoch ms/s or ISO date | | `count` | number | query | no | Candles per page. Default 200, max 1000 | | `page` | number | query | no | Page number, walking backwards in time. Default 1, max 20 | **cURL:** ```bash curl "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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("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", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.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", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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 }, { "low": 77057.9, "date": "2026-08-21T14:30:00.000Z", "high": 77239.1, "open": 77057.9, "close": 77086.8, "volume": 240.025, "openTime": 1787322600000, "turnover": 18517989.0454, "closeTime": 1787322899999 }, { "low": 76855.1, "date": "2026-08-21T14:35:00.000Z", "high": 77233.3, "open": 77086.8, "close": 76862.9, "volume": 358.841, "openTime": 1787322900000, "turnover": 27639309.2306, "closeTime": 1787323199999 }, { "low": 76855.1, "date": "2026-08-21T14:40:00.000Z", "high": 77157.9, "open": 76862.9, "close": 77155.8, "volume": 240.278, "openTime": 1787323200000, "turnover": 18510485.3428, "closeTime": 1787323499999 }, { "low": 77106.6, "date": "2026-08-21T14:45:00.000Z", "high": 77387.9, "open": 77155.8, "close": 77346.1, "volume": 322.436, "openTime": 1787323500000, "turnover": 24917607.0859, "closeTime": 1787323799999 }, { "low": 77288.6, "date": "2026-08-21T14:50:00.000Z", "high": 77448.8, "open": 77346.1, "close": 77308.8, "volume": 334.45, "openTime": 1787323800000, "turnover": 25884342.3251, "closeTime": 1787324099999 } ], "symbol": "BTCUSDT", "dataset": "kline", "hasMore": true, "category": "linear", "interval": "5", "nextPage": 2, "provider": "bybit" } ``` --- ### Mark Price Kline Mark-price candles for one Bybit derivatives contract. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/mark-price-kline` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse) | query | no | Product line. Default linear | | `interval` | enum(1|3|5|15|30|60|120|240|360|720|D|W|M) | query | no | Candle size in minutes, or D/W/M. Default 5 | | `start` | string | query | no | Oldest candle to include. Epoch ms/s or ISO date | | `end` | string | query | no | Newest candle to include. Epoch ms/s or ISO date | | `count` | number | query | no | Candles per page. Default 200, max 1000 | | `page` | number | query | no | Page number, walking backwards in time. Default 1, max 20 | **cURL:** ```bash curl "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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("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", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.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", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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" } ``` --- ### Open Interest Open-interest series for one Bybit derivatives contract, down to five minutes. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/open-interest` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse) | query | no | Product line. Open interest is published for derivatives only | | `intervalTime` | enum(5min|15min|30min|1h|4h|1d) | query | no | Sampling interval. Default 5min | | `start` | string | query | no | Oldest point to include. Epoch ms/s or ISO date | | `end` | string | query | no | Newest point to include. Epoch ms/s or ISO date | | `count` | number | query | no | Points per page. Default 200, max 200 | | `page` | number | query | no | Page number. Default 1, max 20 | **cURL:** ```bash curl "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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("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", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.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", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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" } ``` --- ### Orderbook Order-book snapshot for one Bybit symbol. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/orderbook` **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse|spot|option) | query | no | Product line. Default linear | | `count` | number | query | no | Levels per side. Capped at 500 linear/inverse, 200 spot, 25 option | **cURL:** ```bash curl "https://api.zapi.ink/v1/finance:bybit/orderbook?symbol=BTCUSDT&category=linear&count=50" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zapi.ink/v1/finance:bybit/orderbook?symbol=BTCUSDT&category=linear&count=50", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zapi.ink/v1/finance:bybit/orderbook?symbol=BTCUSDT&category=linear&count=50", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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 } ``` --- ### Premium Index Kline Premium-index candles โ€” the basis Bybit funds against โ€” for one perpetual. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/premium-index-kline` - **Cache TTL:** 30s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear) | query | no | Product line. Premium index is published for linear contracts only | | `interval` | enum(1|3|5|15|30|60|120|240|360|720|D|W|M) | query | no | Candle size in minutes, or D/W/M. Default 5 | | `start` | string | query | no | Oldest candle to include. Epoch ms/s or ISO date | | `end` | string | query | no | Newest candle to include. Epoch ms/s or ISO date | | `count` | number | query | no | Candles per page. Default 200, max 1000 | | `page` | number | query | no | Page number, walking backwards in time. Default 1, max 20 | **cURL:** ```bash curl "https://api.zapi.ink/v1/finance:bybit/premium-index-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: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zapi.ink/v1/finance:bybit/premium-index-kline?symbol=BTCUSDT&category=linear&interval=5&start=2024-01-01T00%3A00%3A00Z&end=2024-01-02T00%3A00%3A00Z&count=200&page=1", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zapi.ink/v1/finance:bybit/premium-index-kline?symbol=BTCUSDT&category=linear&interval=5&start=2024-01-01T00%3A00%3A00Z&end=2024-01-02T00%3A00%3A00Z&count=200&page=1", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "page": 1, "count": 200, "items": [ { "low": -0.00011059, "date": "2026-08-21T14:15:00.000Z", "high": -0.00008915, "open": -0.00005986, "close": -0.00011059, "openTime": 1787321700000, "closeTime": 1787321999999 }, { "low": -0.00004943, "date": "2026-08-21T14:20:00.000Z", "high": 0.00014251, "open": -0.00011059, "close": -0.00004943, "openTime": 1787322000000, "closeTime": 1787322299999 }, { "low": -0.00000355, "date": "2026-08-21T14:25:00.000Z", "high": 0, "open": -0.00004943, "close": -0.00000355, "openTime": 1787322300000, "closeTime": 1787322599999 }, { "low": -0.00013182, "date": "2026-08-21T14:30:00.000Z", "high": 0, "open": -0.00000355, "close": -0.00013182, "openTime": 1787322600000, "closeTime": 1787322899999 }, { "low": -0.000099, "date": "2026-08-21T14:35:00.000Z", "high": 0, "open": -0.00013182, "close": 0, "openTime": 1787322900000, "closeTime": 1787323199999 }, { "low": -0.00002121, "date": "2026-08-21T14:40:00.000Z", "high": 0, "open": 0, "close": -0.00002121, "openTime": 1787323200000, "closeTime": 1787323499999 }, { "low": 0.00003269, "date": "2026-08-21T14:45:00.000Z", "high": 0.00003375, "open": -0.00002121, "close": 0.00003269, "openTime": 1787323500000, "closeTime": 1787323799999 }, { "low": 0.00007119, "date": "2026-08-21T14:50:00.000Z", "high": 0.00014635, "open": 0.00003269, "close": 0.00014635, "openTime": 1787323800000, "closeTime": 1787324099999 } ], "symbol": "BTCUSDT", "dataset": "premium-index-kline", "hasMore": true, "category": "linear", "interval": "5", "nextPage": 2, "provider": "bybit" } ``` --- ### Recent Trade Public prints for one Bybit symbol, newest first. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/recent-trade` - **Cache TTL:** 5s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `symbol` | string | query | yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt | | `category` | enum(linear|inverse|spot|option) | query | no | Product line. Default linear | | `baseCoin` | string | query | no | Base coin, for option prints across a whole coin | | `count` | number | query | no | Prints to return. Default 100, max 1000 (spot caps at 60) | **cURL:** ```bash curl "https://api.zapi.ink/v1/finance:bybit/recent-trade?symbol=BTCUSDT&category=linear&baseCoin=BTC&count=100" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zapi.ink/v1/finance:bybit/recent-trade?symbol=BTCUSDT&category=linear&baseCoin=BTC&count=100", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zapi.ink/v1/finance:bybit/recent-trade?symbol=BTCUSDT&category=linear&baseCoin=BTC&count=100", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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 }, { "date": "2026-08-22T06:51:00.881Z", "side": "sell", "size": 0.002, "time": 1787381460881, "price": 77501.2, "symbol": "BTCUSDT", "tradeId": "7393f4b5-a345-515d-a173-4825b7373ccb", "sequence": 786674002571, "isRpiTrade": false, "isBlockTrade": false }, { "date": "2026-08-22T06:51:00.881Z", "side": "sell", "size": 0.001, "time": 1787381460881, "price": 77501.6, "symbol": "BTCUSDT", "tradeId": "2fd8ce73-9e93-5f2f-935b-839e69f3c480", "sequence": 786674002571, "isRpiTrade": false, "isBlockTrade": false }, { "date": "2026-08-22T06:51:00.881Z", "side": "sell", "size": 0.001, "time": 1787381460881, "price": 77501.7, "symbol": "BTCUSDT", "tradeId": "20cc9e3e-9d8b-5389-8290-aaf724e50a4f", "sequence": 786674002571, "isRpiTrade": false, "isBlockTrade": false }, { "date": "2026-08-22T06:51:00.881Z", "side": "sell", "size": 0.001, "time": 1787381460881, "price": 77501.7, "symbol": "BTCUSDT", "tradeId": "b433b757-3b7c-52a1-947a-80e77e49ccda", "sequence": 786674002571, "isRpiTrade": false, "isBlockTrade": false }, { "date": "2026-08-22T06:51:00.881Z", "side": "sell", "size": 0.003, "time": 1787381460881, "price": 77502.3, "symbol": "BTCUSDT", "tradeId": "8feedeaa-df93-517e-98bf-fd0900613b5c", "sequence": 786674002571, "isRpiTrade": false, "isBlockTrade": false } ], "symbol": "BTCUSDT", "dataset": "recent-trade", "category": "linear", "provider": "bybit" } ``` --- ### Tickers 24h statistics for every Bybit symbol in one product line, or for one symbol. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/finance:bybit/tickers` - **Cache TTL:** 15s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `category` | enum(linear|inverse|spot|option) | query | no | Product line. Default linear | | `symbol` | string | query | no | One symbol. Omit to list the whole product line | | `baseCoin` | string | query | no | Filter by base coin. Required for option when no symbol is given | | `expDate` | string | query | no | Option expiry filter, Bybit's own DDMMMYY form | **cURL:** ```bash curl "https://api.zapi.ink/v1/finance:bybit/tickers?category=linear&symbol=BTCUSDT&baseCoin=BTC&expDate=25DEC26" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zapi.ink/v1/finance:bybit/tickers?category=linear&symbol=BTCUSDT&baseCoin=BTC&expDate=25DEC26", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zapi.ink/v1/finance:bybit/tickers?category=linear&symbol=BTCUSDT&baseCoin=BTC&expDate=25DEC26", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "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": "10000NEXUSDT", "askSize": 4760, "bidSize": 520, "askPrice": 0.01539, "bidPrice": 0.01537, "lastPrice": 0.01539, "markPrice": 0.01534, "volume24h": 3140060, "indexPrice": 0.01529, "fundingRate": 0.00005, "lowPrice24h": 0.01517, "prevPrice1h": 0.01535, "turnover24h": 48146.6748, "highPrice24h": 0.01551, "openInterest": 39140440, "prevPrice24h": 0.01527, "nextFundingDate": "2026-08-22T08:00:00.000Z", "nextFundingTime": 1787385600000, "openInterestValue": 600414.35, "priceChangePct24h": 0.007858 }, { "symbol": "10000SATSUSDT", "askSize": 168500, "bidSize": 43100, "askPrice": 0.00012792, "bidPrice": 0.00012782, "lastPrice": 0.00012786, "markPrice": 0.00012786, "volume24h": 9189557900, "indexPrice": 0.00012785, "fundingRate": 0.00005, "lowPrice24h": 0.00010308, "prevPrice1h": 0.00012744, "turnover24h": 1144345.8561, "highPrice24h": 0.00014132, "openInterest": 2644219800, "prevPrice24h": 0.00012102, "nextFundingDate": "2026-08-22T08:00:00.000Z", "nextFundingTime": 1787385600000, "openInterestValue": 338089.94, "priceChangePct24h": 0.056519 }, { "symbol": "1000BONKPERP", "askSize": 19430, "bidSize": 19780, "askPrice": 0.003233, "bidPrice": 0.003223, "lastPrice": 0.003229, "markPrice": 0.003229, "volume24h": 41614700, "indexPrice": 0.003234, "fundingRate": -0.00019392, "lowPrice24h": 0.002741, "prevPrice1h": 0.003275, "turnover24h": 128784.9711, "highPrice24h": 0.003655, "openInterest": 96746920, "prevPrice24h": 0.002741, "nextFundingDate": "2026-08-22T08:00:00.000Z", "nextFundingTime": 1787385600000, "openInterestValue": 312395.8, "priceChangePct24h": 0.178037 }, { "symbol": "1000BONKUSDT", "askSize": 62100, "bidSize": 35600, "askPrice": 0.003236, "bidPrice": 0.003235, "lastPrice": 0.003237, "markPrice": 0.0032374, "volume24h": 17863724500, "indexPrice": 0.0032377, "fundingRate": 0.00005, "lowPrice24h": 0.00274, "prevPrice1h": 0.003267, "turnover24h": 55322689.5949, "highPrice24h": 0.003664, "openInterest": 3652283600, "prevPrice24h": 0.002743, "nextFundingDate": "2026-08-22T08:00:00.000Z", "nextFundingTime": 1787385600000, "openInterestValue": 11823902.93, "priceChangePct24h": 0.180094 }, { "symbol": "1000BTTUSDT", "askSize": 2342300, "bidSize": 243700, "askPrice": 0.0002999, "bidPrice": 0.0002994, "lastPrice": 0.0002996, "markPrice": 0.0002996, "volume24h": 1409761800, "indexPrice": 0.0002989, "fundingRate": 0.00047791, "lowPrice24h": 0.0002905, "prevPrice1h": 0.0002973, "turnover24h": 421097.919, "highPrice24h": 0.0003086, "openInterest": 1837197400, "prevPrice24h": 0.0002922, "nextFundingDate": "2026-08-22T08:00:00.000Z", "nextFundingTime": 1787385600000, "openInterestValue": 550424.34, "priceChangePct24h": 0.025325 } ], "symbol": null, "dataset": "tickers", "baseCoin": null, "category": "linear", "provider": "bybit" } ``` --- _Generated: 2026-09-25T14:29:24.809Z_