After much of an effort to get quote, now api started giving ReadTimeout after few quotes. Whats wrong now ?
File "D:\workspace_pyCharm\Module_Get_Live_Data_From_Zerodha.py", line 33, in getAllQuotesFromZerodha quote = self.kite.quote(fullid)
File "C:\ProgramData\Anaconda3\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 546, in quote data = self._get("market.quote", {"i": ins})
File "C:\ProgramData\Anaconda3\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 697, in _get return self._request(route, "GET", params)
File "C:\ProgramData\Anaconda3\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 745, in _request raise e
File "C:\ProgramData\Anaconda3\lib\site-packages\kiteconnect-3.7.4-py3.6.egg\kiteconnect\connect.py", line 742, in _request proxies=self.proxies)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\api.py", line 58, in request return session.request(method=method, url=url, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 512, in request resp = self.send(prep, **send_kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 622, in send r = adapter.send(request, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", line 526, in send raise ReadTimeout(e, request=request)
I already have that to continue the loop but looking to understand why it is happening and how can I fix it. I would be relying to get timely quote to execute FO orders so cannot have some cycle missed. It take 2 min to get 50 quotes and its a big time for day trading...
We are looking for permanent solution for time being, you can use Try and catch for this exception.Like this: