Request
https://api.zapi.ink/v1/finance:bybit/klineSend your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 30 seconds.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| symbol | string | query | Yes | Trading symbol. Accepts BTCUSDT, BTC/USDT or btc-usdt Example: BTCUSDT |
| category | enum: linear | inverse | spot | query | No | Product line. Default linear Example: 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 Example: 5 |
| start | string | query | No | Oldest candle to include. Epoch ms/s or ISO date Example: 2020-03-26T00:00:00Z |
| end | string | query | No | Newest candle to include. Epoch ms/s or ISO date Example: 2020-03-27T00:00:00Z |
| count | number | query | No | Candles per page. Default 200, max 1000 Example: 200 |
| page | number | query | No | Page number, walking backwards in time. Default 1, max 20 Example: 1 |
Code examples
curl -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"
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", { method: "GET", headers: { "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" }, }); const data = await res.json(); console.log(data);
import requests res = requests.get( "https://api.zapi.ink/v1/finance:bybit/kline", params={"symbol":"BTCUSDT","category":"linear","interval":"5","start":"2020-03-26T00:00:00Z","end":"2020-03-27T00:00:00Z","count":"200","page":"1"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "finance:bybit", "data": { "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" }, "timestamp": "2026-08-20T14:56:32Z" }
Frequently asked questions
How do I call the Bybit Kline API?
Send a GET request to https://api.zapi.ink/v1/finance:bybit/kline?symbol=BTCUSDT with your Zapi key in the x-api-key header. Parameters — required: symbol; optional: category, interval, start, end, count, page. The response is JSON in the { project, data, timestamp } envelope.
What does the Bybit Kline API return?
OHLCV candles for one Bybit spot or derivatives symbol. The example response has the fields page, count, items, symbol, dataset, hasMore, category, interval. Each item in items has fields such as low, date, high, open, close, volume, openTime, turnover.
Is the Bybit Kline API free?
Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.
Can an AI assistant call the Bybit Kline API?
Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "bybit" and endpoint "kline".
What other Bybit API endpoints are there?
It has 5 endpoints. Besides Kline: Funding History, Instruments Info, Open Interest, Tickers.
