> For the complete documentation index, see [llms.txt](https://docs.clickoptions.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clickoptions.ai/api/historical-market-data-controller.md).

# Historical Market Data Controller

## Get historical candles for options index prices

> Returns historical candles for the given underlying instrument and period as JSON arrays of \[timestamp, open, high, low, close]. Supports optional time anchors to request closed intervals (start/end), forward ranges (start only), backward ranges (end only), or the most recent candles when no anchors are provided. The optional limit defaults to 500 and is capped at 1000.

```json
{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"tags":[],"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"paths":{"/v1/candles/options-index/{symbol}/{period}":{"get":{"tags":["historical-market-data-controller"],"summary":"Get historical candles for options index prices","description":"Returns historical candles for the given underlying instrument and period as JSON arrays of [timestamp, open, high, low, close]. Supports optional time anchors to request closed intervals (start/end), forward ranges (start only), backward ranges (end only), or the most recent candles when no anchors are provided. The optional limit defaults to 500 and is capped at 1000.","operationId":"getHistoricalCandles","parameters":[{"name":"symbol","in":"path","description":"Underlying instrument symbol","required":true,"schema":{"type":"string"}},{"name":"period","in":"path","description":"Candle aggregation period. Available values: MIN1, MIN5, MIN15, H1, H4, D1, W1, M1.","required":true,"schema":{"type":"string"}},{"name":"startTime","in":"query","description":"Start timestamp (inclusive) in milliseconds since epoch.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"endTime","in":"query","description":"End timestamp (inclusive) in milliseconds since epoch.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","description":"Maximum number of candles to return (default 500, max 1000).","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Successfully retrieved candles","content":{"*/*":{"schema":{"type":"array","items":{"type":"array","items":{}}}}}},"400":{"description":"Invalid request parameters"},"404":{"description":"Instrument not found"},"500":{"description":"Internal server error"}}}}}}
```
