Historical Kline
Bulk historical price klines (OHLCV candlesticks) for one or more trading pairs. Public - no authentication required. The endpoint is bulk by design: request one symbol or up to 25 in a single call via the comma-separated assets parameter.
Request
GET /fapi/v1/price/kline
Single asset:
curl -X GET "https://trade.mudrex.com/fapi/v1/price/kline?assets=BTC/USDT&aggregation=1m&start_time=1680312600&end_time=1680312660"Multiple assets (bulk):
curl -X GET "https://trade.mudrex.com/fapi/v1/price/kline?assets=BTC/USDT,ETH/USDT&aggregation=1m&start_time=1680312600&end_time=1680312660"Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
assets | string | Yes | — | Comma-separated trading pairs in <base>/<quote> format, e.g. BTC/USDT or BTC/USDT,ETH/USDT. Maximum 25 symbols per request. A literal / is accepted (no percent-encoding required). |
aggregation | enum | Yes | — | Kline interval. One of: 1m, 3t, 5t, 10t, 15t, 30t, 1h, 4h, 6h, 12h, 1d, 1w, 1mth. |
start_time | number | Yes | — | Epoch seconds, inclusive. |
end_time | number | Yes | — | Epoch seconds, inclusive. |
Response
A JSON type response containing data.asset_ticks is a map keyed by symbol; each value is an array of candles ordered ascending by open time. Each candle is a 6-element array. The same shape is returned whether you request one symbol or many - the map simply has one key per returned asset. Response symbol keys are lowercase (e.g. btc/usdt) regardless of request casing.
Single asset (assets=BTC/USDT):
Status: 200 OK
{
"success": true,
"data": {
"asset_ticks": {
"btc/usdt": [
[1680312600, 28436.6, 28449.81, 28436.6, 28449.81, 0.742521]
]
}
}
}Multiple assets (assets=BTC/USDT,ETH/USDT):
{
"success": true,
"data": {
"asset_ticks": {
"btc/usdt": [
[1680312600, 28436.6, 28449.81, 28436.6, 28449.81, 0.742521]
],
"eth/usdt": [
[1680312600, 1812.4, 1813.9, 1811.0, 1813.2, 15.20831]
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
success | boolean | true on success. |
data.asset_ticks | object | Map of symbol → array of candle arrays. Keys are lowercase, e.g. btc/usdt. |
Candle array layout (each candle is a positional 6-element array):
| Index | Field | Type | Notes |
|---|---|---|---|
| 0 | Open time | uint | Epoch seconds, UTC |
| 1 | Open | number | |
| 2 | High | number | |
| 3 | Low | number | |
| 4 | Close | number | |
| 5 | Volume (quoted in base asset) | float |
Errors
Error responses mirror the success envelope with success: false. Errors are returned as an errors array; each entry has a code and a text.
{ "success": false, "errors": [{ "code": 400, "text": "assets are required" }] }Common errors
400 Bad Request — text is one of:
text | When it occurs |
|---|---|
assets are required | The assets parameter was missing or empty. |
allowed assets size is 25 | More than 25 symbols were requested in one call. |
aggregation not supported | aggregation is not one of the allowed intervals. |
start and end time should be greater than 0 | start_time or end_time was missing or not positive. |
end time should be greater than start time | end_time was less than or equal to start_time. |
invalid assets | An asset was not in valid <base>/<quote> format. |
404 Not Found
{ "success": false, "errors": [{ "code": 404, "text": "asset not found" }] }The requested symbol is not recognised.
429 Too Many Requests
{ "success": false, "errors": [{ "code": 429, "text": "Rate limit exceeded" }] }More than 300 requests per minute from your IP.
500 Internal Server Error
{ "success": false, "errors": [{ "code": 500, "text": "something went wrong" }] }Notes / limits
- A single call returns a maximum of 1440 klines per asset.
- Invalid symbols, or symbols with no klines in the requested interval, are omitted from the response (the call still succeeds for the remaining symbols).
- Maximum 25 symbols per request.
- Response symbol keys are lowercase (
btc/usdt) regardless of request casing. - See Market Data for the shared base URL, conventions, and rate limits.
