We send date object in the IST time zone in WebSocket streaming data. Are you setting any different timezone for your dataframe(df)? You can also debug the same by printing raw historical data APIs date field before converting to dataframe and post-conversion.
def fetchOHLC(ticker,interval,duration):
instrument = instrumentLookup(instrument_df,ticker)
print("Processing OHLC Data")
data = pd.DataFrame(kite.historical_data(4267265,dt.date.today()-dt.timedelta(5), dt.date.today(),interval, continuous=False))
data.set_index("date",inplace=True)
return data
Are you setting any different timezone for your dataframe(df)?
You can also debug the same by printing raw historical data APIs date field before converting to dataframe and post-conversion.