Historical candles
get_historical_dataFetch OHLCV candles for one instrument between two IST dates with configurable intervals, optional open interest, and automatic range splitting for historical market analysis.
Instructions
OHLCV candles for one instrument between two IST times, oldest first, in INR. Returns {instrument,
instrument_token, interval, from, to, columns, candles, count}; each candle is a list in columns order
(date, open, high, low, close, volume, and oi when requested), date being the candle's start as Kite sends it
(e.g. 2026-11-03T09:15:00+0530; day candles are at 00:00).
Kite limits the date range of one request by interval (minute 60 days, 3/5/10minute 100, 15/30minute 200,
60minute 400, day 2000). Longer ranges are split into several requests automatically, newest first, and the
tool stops as soon as it holds limit candles (at most 2000, always the newest). When older candles may exist
in the range, truncated is true and note explains: to read further back, call again with to_date just
before the first candle returned. continuous=true gives a future's day candles across its expired contracts
(interval must be day). oi=true adds open interest (zero or null for plain equities). Needs the paid Kite
Connect plan; historical requests are limited to 3 per second. Output is large (a candle is about 25 tokens, so
2000 candles are about 50k): ask for the range you need, or set limit.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"instrument": "<instrument>",
"interval": "<interval>",
"from_date": "<from_date>",
"to_date": "<to_date>"
},
"name": "get_historical_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| oi | No | add the open interest column (futures and options) | |
| limit | No | keep only the newest N candles (default and maximum 2000) | |
| to_date | Yes | end (IST, inclusive): "YYYY-MM-DD" (up to 23:59:59 of that day) or "YYYY-MM-DD HH:MM:SS"; a time in the future means now | |
| interval | Yes | candle size: minute, 3minute ... 60minute, or day | |
| from_date | Yes | start (IST): "YYYY-MM-DD" (from 00:00:00) or "YYYY-MM-DD HH:MM:SS" | |
| continuous | No | futures only, interval day: stitch the expired contracts of a future together | |
| instrument | Yes | EXCHANGE:TRADINGSYMBOL (e.g. "NSE:INFY", "NSE:NIFTY 50", "NFO:NIFTY25NOVFUT") or a numeric instrument_token (e.g. 408065) |