get_historical_data
Fetches historical OHLC candles for an instrument token and date range, enabling price trend analysis and strategy backtesting.
Instructions
Get historical OHLC candles for an instrument. Use search_instruments first to find the instrument_token. Requires a paid Kite Connect subscription with market data access — not included in the free Personal tier. Minute-level data is capped by Kite to recent history (e.g. ~60 days for 'minute'); day candles go back much further.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| oi | No | Include open interest (F&O only) | |
| limit | No | If set, only return the most recent N candles (protects against huge responses) | |
| to_date | Yes | "YYYY-MM-DD" or "YYYY-MM-DD HH:MM:SS" | |
| interval | Yes | ||
| from_date | Yes | "YYYY-MM-DD" or "YYYY-MM-DD HH:MM:SS" | |
| continuous | No | Stitch together futures/options expiries into one series | |
| instrument_token | Yes |