Skip to main content

Get Candlestick Data

Get historical candlestick/kline data for a trading pair.

HTTP Request

GET /api/v1/spot/market/candles

Request Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol (e.g., BTCUSDT)
granularitystringYesCandlestick interval (e.g., 1m, 5m, 15m, 1h, 4h, 1d)
startTimestringNoStart time in milliseconds
endTimestringNoEnd time in milliseconds
limitstringNoNumber of results to return (default and max may vary)

Request Example

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

Response Parameters

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

Candlestick Data Array Structure

Each candlestick is represented as an array with the following elements in order:

IndexFieldTypeDescription
0openTimenumberCandle open time (milliseconds)
1openstringOpening price
2highstringHighest price
3lowstringLowest price
4closestringClosing price
5volumestringTrading volume (base currency)
6quoteVolumestringTrading volume (quote currency)

Response Example

Success Response

{
"code": "00000",
"msg": "success",
"requestTime": 1732000000000,
"data": [
[1763457000000, "91000.00", "91300.00", "90900.00", "91250.00", "123.456", "11234567.89"],
[1763453400000, "90800.00", "91100.00", "90700.00", "91000.00", "98.765", "8976543.21"]
]
}

Error Codes

CodeMessage
50010Candle data not available