latestOpenAPI 3.0.32026-08-10336178.7 KB
6b7d8bd51050
Klines
Kline / Candlestick Data
Returns candlestick (OHLCV) bars for a symbol.
Data is assembled from a cold store (PostgreSQL) and a hot store (Redis). Missing candles between data points are gap-filled with the previous close price and zero volume.
Price types
| priceType | Description |
|---|---|
| last | Last traded price (default). |
| mark | Mark price — volume is overlaid from last klines. |
| index | Index price — volume is overlaid from last klines. |
Response format
Each element is a JSON array (Binance-compatible):
| Index | Field | Type |
|---|---|---|
| 0 | openTime | int64 |
| 1 | open | string |
| 2 | high | string |
| 3 | low | string |
| 4 | close | string |
| 5 | volume | string |
| 6 | closeTime | int64 |
| 7 | quoteVolume | string |
| 8 | trades | int64 |
| 9 | takerBuyBase | string |
| 10 | takerBuyQuote | string |
| 11 | (unused) | string |
Caching
Responses are cached server-side for 5 seconds (short-TTL). The X-Cache response header indicates HIT or MISS.
get/v2/klines
Query parameters
symbolstring required
Trading pair symbol.
interval'1m' | '3m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '6h' | '8h' | '12h' | '1d' | '3d' | '1w' | '1M' required
Kline interval.
startTimeinteger
Start time in Unix milliseconds (inclusive). Omit to let the server choose.
endTimeinteger
End time in Unix milliseconds (inclusive). Omit to return up to the latest candle.
limitinteger
Maximum number of candles to return. Clamped to 1500.
priceType'last' | 'mark' | 'index'
Price series to use. mark and index klines overlay volume from last klines.
Response
Array of kline bars