@rakeshr currently, we resend the request 3 times for the all timeout error. Even after 3 iterations of request we are getting the same error in some cases.
@Vaga We are aware of this issue and already looking to it. For time being, can you use above exception handle method, that will keep requesting historical response, until data is fetched.
I am getting errors from historical api from past week. i am getting all kinds of errors each time. Please let us know if there are any changes made to historical API in last one month
Hi @rakeshr@sujith . Any update on the issue fix. I am still getting these error and the connection is being broken.. The links which you provided for us to follow does not show any solution.
@ravishastry, The cause could be your network or network connection between client and server or our internal hop connection issue. You can either add delay and fetch it or use Websockets API to fetch live market data.
Can you tell if there is a problem at my end or it there a timeout if we fetch data using historical api? my network connection is 100% stable as I am using google cloud virtual server
We are looking at it. For time being, you can handle ReadTimeout exception at your end, something like:
We are aware of this issue and already looking to it. For time being, can you use above exception handle method, that will keep requesting historical response, until data is fetched.
1. requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
2. NetworkException: Request failed (kitetrade-common).
3. requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
4. kiteconnect.exceptions.NetworkException: Request failed (kitetrade-common).
You can have look to this thread.
ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
The cause could be your network or network connection between client and server or our internal hop connection issue. You can either add delay and fetch it or use Websockets API to fetch live market data.
I am still getting these errors
self._sslobj.do_handshake()
socket.timeout: _ssl.c:1106: The handshake operation timed out
During handling of the above exception, another exception occurred:
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
Can you tell if there is a problem at my end or it there a timeout if we fetch data using historical api? my network connection is 100% stable as I am using google cloud virtual server
def ltp_symbol(symbol):
try :
ltp = int(kite.ohlc(['NSE:' + symbol])['NSE:' + symbol]['last_price'])
except Exception as e:
print(e)
ltp_symnol(symbol)
return ltp