Crypto Backtest Data API

Historical data, second-level precision
Backtest in one line of code

Free crypto OHLCV from 1 second to daily.
OKX & Binance perpetuals — built for systematic backtesting.

backtest.py
from backdb import BackDB

db = BackDB(api_key="bdb_your_key")

# ETH 3s bars — grid-friendly alignment
df = db.get_bars("okx", "ETH-USDT-SWAP", "2024-01-01", "2026-03-01", interval=3)

# Same data — switch to 1m with one parameter
df_1m = db.get_bars("okx", "ETH-USDT-SWAP", "2024-01-01", "2026-03-01", interval=60)

# 100× stream replay — like live feed
for bar in db.stream("okx", "ETH-USDT-SWAP", "2026-01-01", "2026-01-02", speed=100):
    strategy.on_bar(bar)
1s
Min interval
2+
Exchanges
2020
Data from
Free
1m data free
Features

Built for quant developers

One 1-second base series — aggregate to any bar size at query time. Stop downloading the same symbol in ten different intervals.

Any bar size

1s base data aggregated to 3s / 5s / 10s / 30s / 1m / 5m / 1h / 1d — one parameter.

🔄

Stream replay

SSE-style streaming from 1× to 1000× speed — test how your model behaves on a realistic time axis.

📦

Binary bulk download

Compact binary + gzip — roughly 300MB/year for ETH. Work fully offline with zero API latency.

🐍

Python SDK

DataFrame, NumPy, or iterators — pip install backdb and pair with pandas.

🏛️

Multi-exchange

OKX & Binance perpetuals in one schema — compare venues with the same code path.

📊

Quality visibility

Daily coverage, gap detection, spike alerts — trust the bars you backtest on.

API Reference

Simple REST endpoints

JSON by default; CSV and binary downloads supported. Pass your API key in a header or query string.
GET /v1/symbols Symbol list
GET /v1/bars?exchange=okx&symbol=ETH-USDT-SWAP&start=2024-01-01&end=2026-03-01&interval=60 OHLCV query
GET /v1/bars/stream?...&speed=100 Stream replay
GET /v1/bars/download?...&format=binary Bulk download
GET /v1/coverage?exchange=okx&symbol=ETH-USDT-SWAP Coverage / quality
POST /v1/auth/register Get API key
shell
# ETH 1m bars (free tier, no key)
curl "https://api.backdb.io/v1/bars?\
exchange=okx&symbol=ETH-USDT-SWAP&\
start=2026-01-01&end=2026-01-02&interval=60"

# Pro: 1s bars
curl -H "X-API-Key: bdb_your_key" \
  "https://api.backdb.io/v1/bars?\
exchange=okx&symbol=ETH-USDT-SWAP&\
start=2026-01-01&end=2026-01-02&interval=1"
Data Coverage

Coverage

Growing list of top perpetuals — history available from 2020 onward where listed.
BTC-USDT-SWAP2020
ETH-USDT-SWAP2020
SOL-USDT-SWAP2021
BNB-USDT-SWAP2021
XRP-USDT-SWAP2020
DOGE-USDT-SWAP2021
ARB-USDT-SWAP2023
AVAX-USDT-SWAP2021
LINK-USDT-SWAP2020
OP-USDT-SWAP2022
MATIC-USDT-SWAP2021
More symbols coming…
Pricing

Transparent pricing — start free

1-minute data stays free forever. Sub-second tiers cover ingestion & storage.
Starter
Free
Forever free
  • 1m+ bars
  • 1,000 requests / day
  • JSON / CSV
  • 30-day window
  • Sub-second data
  • Stream replay
Use now
Popular
Developer
Free
With signup
  • 1m+ bars
  • 10,000 requests / day
  • All formats incl. binary
  • 90-day window
  • Stream replay
  • Sub-second data
Sign up free
Pro
¥99
/ month
  • Full 1s data
  • Unlimited requests
  • No date cap
  • All formats + binary
  • Up to 1000× stream
  • Priority new listings
Coming soon
Get Started

Get your API key

Sign up with email and start backtesting.