API ReferenceMarket Data

Candles (OHLCV)

GET/api/v1/markets/{marketId}/candlesPublic

Trading APIprice E4 · size E2 · amount E6 (integers)YES | NO

interval takes the named presets 1m/5m/1h/1d (default 1h); an unknown value returns 400. from/to filter on the bucket start ∈ [from, to) and are optional. Buckets come back in ascending order of bucket start, and buckets with no trades are omitted. Passing minCursor returns 400. Derived from the same source as the individual trades (aggregated fills), so the two reconcile.

Path parameters

  • marketIdstringpathrequired

    Engine market id (read endpoints do not accept a slug unless that endpoint says otherwise)

    Example"mkt-0001"

Query parameters

  • interval1m | 5m | 1h | 1dqueryoptional

    Candle interval

    Default"1h"Example"1m"

  • fromint64queryoptional

    Epoch milliseconds

    Example1

  • toint64queryoptional

    Epoch milliseconds

    Example1

Response

200Array of candles

The response is an array; the fields below describe each element:

  • bucketStartMsint64

    Bucket start (epoch milliseconds)

    Example1758240000000

  • openE4integer

    Open (1e-4)

    Example5200

  • highE4integer

    High (1e-4)

    Example5200

  • lowE4integer

    Low (1e-4)

    Example5200

  • closeE4integer

    Close (1e-4)

    Example5200

  • volumeE2int64

    Trade size (1e-2 shares)

    Example1000

  • tradeCountinteger

    Number of trades

    Example1

Switch status codes in the response example to view errors. For all codes, see the Errors page.