~\Desktop\Zerodha\v2\misc_func.py in candle_close(scrip_token, sl_time) 26 } 27 x = requests.get(url, headers=headers) ---> 28 for i in range(len(x.json()['data']['candles'])): 29 if x.json()['data']['candles'][i][0][11:16] == sl_time: 30 candle_minute_close = x.json()['data']['candles'][i][4]
Can you elaborate which library version you are using and the complete code and stacktrace? You had ask the same query here couple of days back in another thread. From your previous error trace-back, you don't seem to be using official Kite Connect APIs. Also, for your use case above, we are in process of limiting and detecting such unusual activity/requests made on Kite web to avoid scrapping and this will lead to your production code break-down. So, it's always recommended to use official Kite connect APIs.
You had ask the same query here couple of days back in another thread. From your previous error trace-back, you don't seem to be using official Kite Connect APIs.
Also, for your use case above, we are in process of limiting and detecting such unusual activity/requests made on Kite web to avoid scrapping and this will lead to your production code break-down. So, it's always recommended to use official Kite connect APIs.