Get Historical Candlestick Data
Get historical Kline/candlestick data for a futures symbol. This endpoint provides access to older historical data.
HTTP Request
GET /api/v1/future/market/history-candles
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair symbol (e.g., BTCUSDT) |
| interval | string | Yes | Kline interval: "1m", "3m", "5m", "15m", "30m", "2h", "4h", "6h", "8h", "12h", "1d", "3d", "1w", "1M" |
| limit | number | No | Number of candles to return (default: 500, max: 1500) |
| startTime | number | No | Start time in milliseconds (Unix timestamp) |
| endTime | number | No | End time in milliseconds (Unix timestamp) |
Request Example
Basic Request
curl -X GET "https://open-api.bydoxe.com/api/v1/future/market/history-candles?symbol=BTCUSDT&interval=1h&limit=500"
Request with Time Range
curl -X GET "https://open-api.bydoxe.com/api/v1/future/market/history-candles?symbol=BTCUSDT&interval=1d&startTime=1700000000000&endTime=1732000000000"
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code |
| msg | string | Response message |
| requestTime | number | Request timestamp in milliseconds |
| data | array | Array of historical candlestick data |
Data Array Structure
Each element in the data array is an array with the following structure:
| Index | Field Name | Type | Description |
|---|---|---|---|
| 0 | openTime | number | Opening time in milliseconds (Unix timestamp) |
| 1 | open | string | Opening price |
| 2 | high | string | Highest price |
| 3 | low | string | Lowest price |
| 4 | close | string | Closing price |
| 5 | volume | string | Trading volume in base asset |
| 6 | quoteVolume | string | Trading volume in quote asset |
Response Example
Success Response
{
"code": "00000",
"msg": "success",
"requestTime": 1732000000000,
"data": [[1763457000000, "91000.00", "91300.00", "90900.00", "91250.00", "123.456", "7890.123"]]
}
Error Codes
| Code | Message |
|---|---|
| 40034 | symbol does not exist |
| 40034 | interval does not exist |
| 50010 | Upstream response invalid |