Since yesterday I am getting ReadTimeout error on all my algos running on AWS. Same code has been running flawlessly since last 3+ months
File "z_consolidation.py", line 157, in df2 =pd.DataFrame(kite.historical_data(instrument_id2, from_date=date.today(), to_date=date.today(), interval='minute')) File "/usr/local/lib/python3.6/dist-packages/kiteconnect/connect.py", line 631, in historical_data "oi": 1 if oi else 0 File "/usr/local/lib/python3.6/dist-packages/kiteconnect/connect.py", line 826, in _get return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json) File "/usr/local/lib/python3.6/dist-packages/kiteconnect/connect.py", line 877, in _request raise e File "/usr/local/lib/python3.6/dist-packages/kiteconnect/connect.py", line 874, in _request proxies=self.proxies) File "/home/ubuntu/.local/lib/python3.6/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/home/ubuntu/.local/lib/python3.6/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/home/ubuntu/.local/lib/python3.6/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/home/ubuntu/.local/lib/python3.6/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
@maheshhraut, We don't recommend polling historical data API for live market strategies. We recommend you generate candles at your end using the live market data provided on Websockets API.
We don't recommend polling historical data API for live market strategies. We recommend you generate candles at your end using the live market data provided on Websockets API.
You can get started from here.