API Reference
Base URL: https://api.cryptodataapi.dev
Authentication
Pass your API key in the X-API-Key header with every request.
curl https://api.cryptodataapi.dev/v1/trades \ -H "X-API-Key: YOUR_API_KEY" \ -G -d "exchange=binance&symbol=BTCUSDT&..."
Rate limits
| Plan | Requests / minute | History window |
|---|---|---|
| Free | 10 | 7 days |
| Pro | 120 | 90 days |
| Enterprise | 1,000 | 2 years |
Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Error codes
| Code | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 403 | Plan does not include this endpoint or time range |
| 422 | Invalid query parameters |
| 429 | Rate limit exceeded — wait for X-RateLimit-Reset |
| 500 | Internal server error |
GET
/healthAll plansReturns API health, active Redis streams, and disk usage.
Request
curl https://api.cryptodataapi.dev/health
Response
{
"status": "ok",
"streams": {
"binance:trades:BTCUSDT": 147823,
"bybit:trades:BTCUSDT": 148201,
"okx:trades:BTCUSDT": 152340
},
"data_dir_gb": 12.4
}GET
/v1/symbolsAll plansList all available exchange/symbol combinations with available data types.
Request
curl https://api.cryptodataapi.dev/v1/symbols \ -H "X-API-Key: YOUR_KEY"
Response
[
{
"exchange": "binance",
"symbol": "BTCUSDT",
"data_types": ["trades", "books", "funding"],
"earliest": "2026-03-18",
"latest": "2026-03-17"
},
...
]GET
/v1/tradesAll plansQuery historical trade ticks. Supports pagination via cursor.
Parameters
| exchange | string | required | binance | bybit | okx |
| symbol | string | required | e.g. BTCUSDT |
| start | ISO8601 | required | Start of time range (UTC) |
| end | ISO8601 | required | End of time range (UTC) |
| format | string | optional | json | csv | parquet (Pro+) |
| limit | int | optional | Max rows (default 10000, max 100000) |
| cursor | int | optional | Pagination cursor (timestamp_ns) |
Request
curl "https://api.cryptodataapi.dev/v1/trades?exchange=binance&symbol=BTCUSDT&start=2026-03-17T00:00:00Z&end=2026-03-17T01:00:00Z&limit=3" \ -H "X-API-Key: YOUR_KEY"
Response
{
"data": [
{
"timestamp_ns": 1742169600000123456,
"price": 83142.5,
"qty": 0.003,
"side": "buy",
"trade_id": "3891234567"
}
],
"next_cursor": 1742169600000123456,
"count": 3
}GET
/v1/booksAll plansQuery L2 order book snapshots. Each row is a full book state.
Parameters
| exchange | string | required | binance | bybit | okx |
| symbol | string | required | e.g. BTCUSDT |
| start | ISO8601 | required | Start of time range (UTC) |
| end | ISO8601 | required | End of time range (UTC) |
| levels | int | optional | Depth levels to return (default 10, max 50) |
| format | string | optional | json | csv | parquet (Pro+) |
| limit | int | optional | Max rows (default 1000) |
Request
curl "https://api.cryptodataapi.dev/v1/books?exchange=binance&symbol=BTCUSDT&start=2026-03-17T00:00:00Z&end=2026-03-17T00:01:00Z&levels=5" \ -H "X-API-Key: YOUR_KEY"
Response
{
"data": [
{
"timestamp_ns": 1742169600012000000,
"bids": [[83142.5, 1.23], [83141.0, 0.45], ...],
"asks": [[83143.0, 0.89], [83144.5, 2.10], ...],
"spread": 0.5,
"midprice": 83142.75
}
],
"count": 60
}GET
/v1/fundingAll plansQuery perpetual funding rate snapshots (updated every second).
Parameters
| exchange | string | required | binance | bybit | okx |
| symbol | string | required | e.g. BTCUSDT |
| start | ISO8601 | required | Start of time range (UTC) |
| end | ISO8601 | required | End of time range (UTC) |
| format | string | optional | json | csv | parquet (Pro+) |
Request
curl "https://api.cryptodataapi.dev/v1/funding?exchange=binance&symbol=BTCUSDT&start=2026-03-17T00:00:00Z&end=2026-03-17T08:00:00Z" \ -H "X-API-Key: YOUR_KEY"
Response
{
"data": [
{
"timestamp_ns": 1742169600000000000,
"funding_rate": 0.0001234,
"mark_price": 83142.5,
"next_funding_time": 1742198400000
}
],
"count": 28800
}GET
/v1/metrics/obiPro+Order Book Imbalance — (bid_vol - ask_vol) / (bid_vol + ask_vol). Ranges from -1 to 1.
Parameters
| exchange | string | required | binance | bybit | okx |
| symbol | string | required | e.g. BTCUSDT |
| start | ISO8601 | required | Start of time range (UTC) |
| end | ISO8601 | required | End of time range (UTC) |
Request
curl "https://api.cryptodataapi.dev/v1/metrics/obi?exchange=binance&symbol=BTCUSDT&start=2026-03-17T00:00:00Z&end=2026-03-17T00:01:00Z" \ -H "X-API-Key: YOUR_KEY"
Response
{
"data": [
{
"timestamp_ns": 1742169600012000000,
"obi": 0.142,
"top5_obi": 0.218
}
]
}