Historical api returning none

abhitrade
I am using this code

instrument_token="2513665"
from_date = "2020-10-05 09:15:00"
to_date = "12020-10-05 09:30:00"
interval="15minute"

def get_historical_data():
try:
return kite.historical_data(instrument_token,from_date,to_date,interval,False,False)
except Exception as e:
print(e)

records= get_historical_data()

records are none. what to do.
Tagged:
  • rakeshr
    to_date = "12020-10-05 09:30:00"
    Date param doesn't seem to be correct 12020.
Sign In or Register to comment.