Request
https://api.zapi.ink/v1/finance:binance/klinesSend 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 5 minutes.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| symbol | string | query | Yes | Trading pair. Accepts BTCUSDT, BTC/USDT or btc_usdt Example: BTCUSDT |
| interval | enum: 1m | 3m | 5m | 15m | 30m | 1h | 2h | 4h | 6h | 8h | 12h | 1d | 3d | 1w | 1M | query | No | Candle size. Default 1d Example: 1d |
| count | number | query | No | Number of candles. Default 200, max 1000 Example: 200 |
| limit | number | query | No | Alias for count, and wins when both are sent. Max 1000 Example: 1000 |
| startTime | string | query | No | Oldest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds Example: 2024-01-01 |
| endTime | string | query | No | Newest candle to return, matched on its open time and inclusive. ISO date or epoch milliseconds Example: 2024-03-01 |
Code examples
curl -X GET "https://api.zapi.ink/v1/finance:binance/klines?symbol=BTCUSDT&interval=1d&count=200&limit=1000&startTime=2024-01-01&endTime=2024-03-01" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/finance:binance/klines?symbol=BTCUSDT&interval=1d&count=200&limit=1000&startTime=2024-01-01&endTime=2024-03-01", { 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:binance/klines", params={"symbol":"BTCUSDT","interval":"1d","count":"200","limit":"1000","startTime":"2024-01-01","endTime":"2024-03-01"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "finance:binance", "data": { "count": 61, "symbol": "BTCUSDT", "candles": [ { "low": 42180.77, "date": "2024-01-01T00:00:00.000Z", "high": 44184.1, "open": 42283.58, "close": 44179.55, "openTime": 1704067200000, "closeTime": 1704153599999, "tradeCount": 1114623, "volumeBase": 27174.29903, "volumeQuote": 1169995682.0280013 }, { "low": 44148.34, "date": "2024-01-02T00:00:00.000Z", "high": 45879.63, "open": 44179.55, "close": 44946.91, "openTime": 1704153600000, "closeTime": 1704239999999, "tradeCount": 2247532, "volumeBase": 65146.40661, "volumeQuote": 2944331821.8230762 }, { "low": 40750, "date": "2024-01-03T00:00:00.000Z", "high": 45500, "open": 44946.91, "close": 42845.23, "openTime": 1704240000000, "closeTime": 1704326399999, "tradeCount": 2658041, "volumeBase": 81194.55173, "volumeQuote": 3507104563.744232 }, { "low": 42613.77, "date": "2024-01-04T00:00:00.000Z", "high": 44729.58, "open": 42845.23, "close": 44151.1, "openTime": 1704326400000, "closeTime": 1704412799999, "tradeCount": 1819944, "volumeBase": 48038.06334, "volumeQuote": 2095095359.4936347 }, { "low": 42450, "date": "2024-01-05T00:00:00.000Z", "high": 44357.46, "open": 44151.1, "close": 44145.11, "openTime": 1704412800000, "closeTime": 1704499199999, "tradeCount": 2064845, "volumeBase": 48075.25327, "volumeQuote": 2100953924.3687155 }, { "low": 43397.05, "date": "2024-01-06T00:00:00.000Z", "high": 44214.42, "open": 44145.12, "close": 43968.32, "openTime": 1704499200000, "closeTime": 1704585599999, "tradeCount": 956642, "volumeBase": 17835.06144, "volumeQuote": 781212883.4916061 } ], "exchange": "binance", "interval": "1d" }, "timestamp": "2026-08-02T04:20:59Z" }
Frequently asked questions
How do I call the Binance Klines API?
Send a GET request to https://api.zapi.ink/v1/finance:binance/klines?symbol=BTCUSDT with your Zapi key in the x-api-key header. Parameters — required: symbol; optional: interval, count, limit, startTime, endTime. The response is JSON in the { project, data, timestamp } envelope.
What does the Binance Klines API return?
OHLCV candles from one minute to one month. The example response has the fields count, symbol, candles, exchange, interval. Each item in candles has fields such as low, date, high, open, close, openTime, closeTime, tradeCount.
Is the Binance Klines 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 Binance Klines 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 "binance" and endpoint "klines".
What other Binance API endpoints are there?
It has 5 endpoints. Besides Klines: Ticker, Tickers, Order book, Trades.
