> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/api/binary-options/updowncandles.md).

# upDownCandles

**Lighter only.**

Get the OHLC candles (1s = the exact price observations, or 30s) of an up/down market series (symbol + duration, e.g. btc/5m) in a bounded time range (at most 24h), oldest first. Pass next\_cursor as start\_timestamp to page forward; live candles are on the up\_down\_candle/// websocket channel.

These candles describe the underlying price used to resolve an Up/Down market. They are separate from order-book candles. Timestamps are in Unix seconds, and each request covers at most 24 hours. See [Underlying price](https://lighter-1.gitbook.io/all-docs/developers/binary-options/discover-markets#underlying-price) and [Live Up/Down candlesticks](https://lighter-1.gitbook.io/all-docs/developers/binary-options/websocket#up-down-candlesticks).

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"tags":[{"name":"binary-options"}],"servers":[{"url":"https://mainnet.zklighter.elliot.ai","description":"Lighter mainnet"},{"url":"https://testnet.zklighter.elliot.ai","description":"Lighter testnet"}],"paths":{"/api/v1/upDownCandles":{"get":{"summary":"upDownCandles","operationId":"upDownCandles","tags":["binary-options"],"description":"**Lighter only.**\n\nGet the OHLC candles (1s = the exact price observations, or 30s) of an up/down market series (symbol + duration, e.g. btc/5m) in a bounded time range (at most 24h), oldest first. Pass next_cursor as start_timestamp to page forward; live candles are on the up_down_candle/<symbol>/<duration>/<resolution> websocket channel.\n\nThese candles describe the underlying price used to resolve an Up/Down market. They are separate from order-book candles. Timestamps are in Unix seconds, and each request covers at most 24 hours. See [Underlying price](https://lighter-1.gitbook.io/all-docs/developers/binary-options/discover-markets#underlying-price) and [Live Up/Down candlesticks](https://lighter-1.gitbook.io/all-docs/developers/binary-options/websocket#up-down-candlesticks).","parameters":[{"name":"symbol","in":"query","description":" market series: underlying (case-insensitive) ...","required":true,"schema":{"type":"string"}},{"name":"duration","in":"query","description":" ... and market duration, e.g. 30s or 5m","required":true,"schema":{"type":"string"}},{"name":"resolution","in":"query","description":" 1s candles are the observations themselves","required":false,"schema":{"type":"string","enum":["1s","30s"],"default":"1s"}},{"name":"start_timestamp","in":"query","description":" inclusive bucket start, seconds","required":true,"schema":{"type":"integer","format":"int64","minimum":0,"maximum":5000000000}},{"name":"end_timestamp","in":"query","description":" inclusive, seconds; at most 24h after start_timestamp","required":true,"schema":{"type":"integer","format":"int64","minimum":0,"maximum":5000000000}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":"1000","minimum":1,"maximum":3600}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespGetUpDownCandles"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultCode"}}}}}}}},"components":{"schemas":{"RespGetUpDownCandles":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"candles":{"type":"array","items":{"$ref":"#/components/schemas/UpDownCandle"},"description":" ascending by timestamp"},"next_cursor":{"type":"integer","format":"int64","description":" start_timestamp of the next page; 0 when the range is exhausted"}},"title":"RespGetUpDownCandles","required":["code","candles"]},"UpDownCandle":{"type":"object","properties":{"symbol":{"type":"string"},"duration":{"type":"string"},"resolution":{"type":"string"},"timestamp":{"type":"integer","format":"int64","description":" bucket start, unix seconds"},"open":{"type":"string","description":" exact provider prices, decimal strings"},"high":{"type":"string"},"low":{"type":"string"},"close":{"type":"string"},"provider":{"type":"string","description":" provider feed of the last observation of the candle"},"feed_id":{"type":"string"}},"title":"UpDownCandle","required":["symbol","duration","resolution","timestamp","open","high","low","close","provider","feed_id"]},"ResultCode":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"title":"ResultCode","required":["code"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/api/binary-options/updowncandles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
