I want to fetch CLOSE PRICE by using historical API, on any date or any time. but I don't understand which function should use or how I have to use that function. Please guide me about this problem.
@sujith no sujith, i'm looking for historical data. assume I want CLOSE PRICE on 12-03-2021 09:50:59 time on (BANKNIFTY 33000 STRIKE DATA / or may be I can use instrument token)
Yes. Actually,the seconds value doesn't matter,so you don't need that. Kite stores data in minute candles. So,you will get minute candles only even if you pass seconds value.
Hi, I need the price of an option at specific time. In real time, I use kite.ltp for last traded price. For backtest I need historical data and using as below with instrument_token. my trade date for which I need data is '2025-06-20 11:45:00' calculating from_date by reducing 1 minute like below:
Please note, I am taking the datetime data from the value I received from date column of historical data of nifty index for a particular date range. For a particular row/date of values of nifty, I need the price data of some option, for which I identified the instrument token and used the above mentioned call. I took to_date as the value received from nifty index data, subtract 1 minute from that data and use than as from value, used 'minute' as interval to fetch price data for 1 minute candle.
The date value shown in excel sheet for the historical data for nifty is shown as "2025-06-20 11:45:00+05:30"
assume I want CLOSE PRICE on 12-03-2021 09:50:59 time on (BANKNIFTY 33000 STRIKE DATA / or may be I can use instrument token)
I need the price of an option at specific time. In real time, I use kite.ltp for last traded price. For backtest I need historical data and using as below with instrument_token.
my trade date for which I need data is '2025-06-20 11:45:00'
calculating from_date by reducing 1 minute like below:
from_date = trade_date - datetime.timedelta(minutes=1)
kite.historical_data(15973378, from_date=from_date, to_date=trade_date, interval='minute')
But getting the exception invalid from date.
Please suggest.
Thanks
Vivek
I took to_date as the value received from nifty index data, subtract 1 minute from that data and use than as from value, used 'minute' as interval to fetch price data for 1 minute candle.
The date value shown in excel sheet for the historical data for nifty is shown as "2025-06-20 11:45:00+05:30"