Skip to main content
Question
FYERS API
Asked a question 3 months ago

im suddenly getting these error "KeyError: 'candles' from last 2 days i haven't change my code ,i never got these error before . here is my code. data = {"symbol":"NSE:SBIN-EQ","resolution":"1d","date_format":"1","range_from":"2022-6-1","range_to":today,"cont_flag":"1"} hist_data = fyers.history(data) hist_data = hist_data['candles'] df = pd.DataFrame(hist_data, columns=['data', 'open', 'high', 'low', 'close', 'volume'])

Join FYERS Community to pick others' brains on Trading/Investing

Hi Aditya,
Did you log the response which you got in this line hist_data = fyers.history(data)
the data stored in hist_data?
we would be able to figure out the issue then.