Guides
Guides

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

ParameterTypeRequiredDefaultDescription
assetsstringYesComma-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).
aggregationenumYesKline interval. One of: 1m, 3t, 5t, 10t, 15t, 30t, 1h, 4h, 6h, 12h, 1d, 1w, 1mth.
start_timenumberYesEpoch seconds, inclusive.
end_timenumberYesEpoch 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

FieldTypeDescription
successbooleantrue on success.
data.asset_ticksobjectMap of symbol → array of candle arrays. Keys are lowercase, e.g. btc/usdt.

Candle array layout (each candle is a positional 6-element array):

IndexFieldTypeNotes
0Open timeuintEpoch seconds, UTC
1Opennumber
2Highnumber
3Lownumber
4Closenumber
5Volume (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 Requesttext is one of:

textWhen it occurs
assets are requiredThe assets parameter was missing or empty.
allowed assets size is 25More than 25 symbols were requested in one call.
aggregation not supportedaggregation is not one of the allowed intervals.
start and end time should be greater than 0start_time or end_time was missing or not positive.
end time should be greater than start timeend_time was less than or equal to start_time.
invalid assetsAn 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.