I have recently started using your API n was getting this network issue again n again I tried checking out the Kite Connect Developer Forum & it didn't help this time
Error that I get Banknifty Open Price: 43400 Fri May 12 09:38:00 2023 CE Option New High Price: 730 Fri May 12 09:38:01 2023 Traceback (most recent call last): File "/Users/karthikmudaliar/Desktop/Triangle_Code/Main_run.py", line 43, in ce1_ltp = kite.quote(ce1)[ce1]['ohlc']["high"] File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kiteconnect/connect.py", line 581, in quote data = self._get("market.quote", params={"i": ins}) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kiteconnect/connect.py", line 851, in _get return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kiteconnect/connect.py", line 927, in _request raise exp(data["message"], code=r.status_code) kiteconnect.exceptions.NetworkException: Too many requests
My Code from kiteconnect import KiteConnect import pandas as pd import datetime import time
# Loop to save high prices while True: now = datetime.datetime.now().time() if now >= start_idle and now < end_idle: print("IDLE", time.ctime()) time.sleep(10) elif now >= end_idle: while True: now = datetime.datetime.now().time() ce1 = 'NFO:BANKNIFTY23518'+str(bnf_final-500)+'CE' if now >= start_time and now <= end_time: ce1_ltp = kite.quote(ce1)[ce1]['ohlc']["high"] if ce1_ltp > ce1_high: ce1_high = ce1_ltp print(f"CE Option New High Price: {ce1_high}", time.ctime()) time.sleep(1) elif now > end_time: print(f"Saving high price loop closed {ce1_high}", time.ctime()) break break