For the complete documentation index, see llms.txt. This page is also available as Markdown.

candles

Get candles data. Returns at most 500 candles per call. Zero values are omitted from the response.

get
/api/v1/candles
Query parameters
market_idinteger · int16Required

Public market identifier returned by orderBooks or events.

resolutionstring · enumRequired

Time interval for each returned data point. Allowed values: 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d.

Possible values:
start_timestampinteger · int64 · max: 5000000000000Required

Inclusive start of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds.

end_timestampinteger · int64 · max: 5000000000000Required

End of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds.

count_backinteger · int64Required

Backward-window sizing hint when start_timestamp is 0. An explicit start/end range takes precedence; this is not a strict limit on response length.

set_timestamp_to_endbooleanOptional

Use the end of each candle interval for its timestamp instead of the start.

Default: false
merge_mark_pricebooleanOptional

Merge mark-price samples into trade candle prices.

Default: false
Responses
200

A successful response.

application/json
codeinteger · int32RequiredExample: 200
rstringRequired

Resolution

Example: 1m
messagestringOptional
get/api/v1/candles
GET /api/v1/candles?market_id=1&resolution=1m&start_timestamp=1&end_timestamp=1&count_back=1 HTTP/1.1
Host: mainnet.zklighter.elliot.ai
Accept: */*
{
  "code": 200,
  "r": "1m",
  "c": [
    {
      "t": 1767700500000,
      "o": 3236.86,
      "h": 3237.78,
      "l": 3235.36,
      "c": 3235.39,
      "v": 55.1632,
      "V": 178530.793575,
      "i": 779870452,
      "C": 3024.66,
      "H": 3034.66,
      "L": 3014.66,
      "O": 3024.66
    }
  ],
  "message": "text"
}

Last updated

Was this helpful?