REST API
Candles
Retrieve historical OHLCVT candle data for a trading pair on an exchange.
Retrieves historical OHLCVT (Open, High, Low, Close, Volume, Trades) candle data for a trading pair on a single exchange.
Authentication
API key via X-API-Key header.
Endpoint
GET /api/v1/candlesParameters
| Name | In | Required | Description |
|---|---|---|---|
exchange | query | Yes | Exchange ID (e.g., binancef, bybitf) |
symbol | query | Yes | Trading pair with slash separator (e.g., btc/usd, eth/usd) |
tf | query | Yes | Timeframe (e.g., 1m, 5m, 1h, 1d) |
from | query | Yes | Start timestamp (Unix seconds, inclusive) |
to | query | Yes | End timestamp (Unix seconds, exclusive) |
Note: This endpoint does not support aggregated exchanges. Use a single exchange ID.
Rate Limits
- Cost multiplier: 1x
- Max points: 100,000 per request
- Formula:
ceil(points / 1000) * multiplier
Response
{
"data": [
{
"t": 1704067200,
"o": 42000.50,
"h": 42150.00,
"l": 41950.00,
"c": 42100.00,
"vb": 1500000.00,
"vs": 1400000.00,
"tb": 1250,
"ts": 1180
},
{
"t": 1704067260,
"o": 42100.00,
"h": 42200.00,
"l": 42050.00,
"c": 42180.00,
"vb": 1200000.00,
"vs": 1100000.00,
"tb": 980,
"ts": 920
}
],
"exchange": "binancef",
"symbol": "btc/usd",
"tf": "1m",
"from": 1704067200,
"to": 1704153600,
"points": 1440
}Types
Response Type: OHLCVT
{"t": 1704067200, "o": 42000.5, "h": 42150.0, "l": 41950.0, "c": 42100.0, "vb": 1500000.0, "vs": 1400000.0, "tb": 1250, "ts": 1180}| Field | Type | Description |
|---|---|---|
t | int64 | Unix timestamp (seconds) |
o, h, l, c | float64 | Open, high, low, close price |
vb, vs | float64 | Buy/sell volume (USD) |
tb, ts | int64 | Buy/sell trade count |
See Types for full details.
Errors
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | Missing or invalid API key |
INVALID_PARAMS | 400 | Invalid or missing query parameters |
INVALID_EXCHANGE | 400 | Unknown or unsupported exchange ID |
INVALID_TIMEFRAME | 400 | Invalid timeframe format or outside allowed range |
MAX_POINTS_EXCEEDED | 400 | Request exceeds 100,000 datapoints |
TIER_RESTRICTED | 403 | Data outside tier's allowed historical range |
RATE_LIMITED | 429 | Rate limit exceeded |
TIMEOUT | 504 | Query exceeded 30 second timeout |
INTERNAL_ERROR | 500 | Internal server error |