v1

latestOpenAPI 3.1.02026-07-2657157254.1 KB
binance

Get Binance Candles

Fetch OHLCV candlestick data for a Binance trading pair.

Candle prices are derived from book ticker mid-prices (not trade prices).

Backtesting crypto up/down markets:

  • Use interval=15m for 15-minute prediction markets
  • Use interval=1h for 1-hour prediction markets
  • Use interval=4h and interval=1d for longer timeframes
get/v2/binance/candles/{symbol}

Path parameters

symbol'BTCUSDT' | 'ETHUSDT' | 'SOLUSDT' | 'XRPUSDT' required

Supported Binance trading pairs for crypto up/down market backtesting.

Trading pair

Query parameters

interval'1s' | '1m' | '5m' | '15m' | '1h' | '4h' | '1d'

Candlestick intervals aligned with crypto up/down market timeframes.

  • 1s, 1m: high-resolution data from pre-aggregated tables
  • 5m, 15m, 1h, 4h, 1d: aggregated on-the-fly from 1m candles

Candle interval

start_timeinteger nullable

Unix timestamp (seconds) for range start

Unix timestamp (seconds) for range start

end_timeinteger nullable

Unix timestamp (seconds) for range end

Unix timestamp (seconds) for range end

limitinteger

Max candles to return

Max candles to return

Response

Successful Response

symbolstring required

Trading pair (e.g. BTCUSDT)

intervalstring required

Candle interval (e.g. 15m, 1h)

Example response

{
  "candles": [
    {
      "avg_spread": 0.1,
      "close": 103275.3,
      "high": 103300.5,
      "low": 103200,
      "open": 103250.12,
      "tick_count": 15420,
      "timestamp": 1706745600
    }
  ]
}