Skip to main content

Get Candlestick Data

Get Kline/candlestick data for a futures symbol with customizable time intervals.

HTTP Request

GET /api/v1/future/market/candles

Request Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol (e.g., BTCUSDT)
intervalstringYesKline interval: "1m", "3m", "5m", "15m", "30m", "2h", "4h", "6h", "8h", "12h", "1d", "3d", "1w", "1M"
limitnumberNoNumber of candles to return (default: 500, max: 1500)
startTimenumberNoStart time in milliseconds (Unix timestamp)
endTimenumberNoEnd time in milliseconds (Unix timestamp)

Request Example

Basic Request

curl -X GET "https://open-api.bydoxe.com/api/v1/future/market/candles?symbol=BTCUSDT&interval=1h&limit=500"

Request with Time Range

curl -X GET "https://open-api.bydoxe.com/api/v1/future/market/candles?symbol=BTCUSDT&interval=1h&startTime=1732000000000&endTime=1732086400000"

Response Parameters

ParameterTypeDescription
codestringResponse code
msgstringResponse message
requestTimenumberRequest timestamp in milliseconds
dataarrayArray of candlestick data

Data Array Structure

Each element in the data array is an array with the following structure:

IndexField NameTypeDescription
0openTimenumberOpening time in milliseconds (Unix timestamp)
1openstringOpening price
2highstringHighest price
3lowstringLowest price
4closestringClosing price
5volumestringTrading volume in base asset
6quoteVolumestringTrading 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 Response

{
"code": "40034",
"msg": "Invalid symbol or interval",
"requestTime": 1732000000000
}

Error Codes

CodeMessage
40034symbol does not exist
40034interval does not exist
50010Upstream response invalid