Hello, For all day i am getting time exception. All kite calls are sequential i.e. no multiple thread its plain sequential program to read quotes or position details.
@npchoubey No, there is no issue at our end for Kite Connect APIs. Are you getting request timeout error for all API calls or it's random in between? For all random time-out error in between, you may use below code:
try: Your code logic here except ReadTimeout: pass
i am essentially calling only 2 apis -- quote() and positions() and both were thowing exception randomly.
My code is covered under try block but I never seen so many exceptions ever.
i could tickers being updated on kite GUI so ideally it should not be a net issues .
However , today i noticed another behaviour. when i ran my program thru Windows command prompt ( which i do daily ) after inputting token, it did not connect to kite server. But code worked fine within my Code Studio IDE . Not sure if you guys know any such issue and resolution
Deep diving into my code it was not just quote but place_order had failed to execute at 2019-09-23 13:50:57,012 - 1519 - Failed to place order of SELL_STRANGLE HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
This really critical as I had placed order for strangle and 1 leg was executed and second leg failed and it opened up me to high risk, if I manage to fire fight.
Hope i can get some real good reason why i was getting time outs.
Connection time out error "can occur" when consumer's network layer is clogged, Socket connection producers "usually/dont" actually await ack,or it can be due to erratic internet connection(intermittent)...
No, there is no issue at our end for Kite Connect APIs.
Are you getting request timeout error for all API calls or it's random in between?
For all random time-out error in between, you may use below code:
can you verify if param is correct for Quote call ?
My code is covered under try block but I never seen so many exceptions ever.
i could tickers being updated on kite GUI so ideally it should not be a net issues .
However , today i noticed another behaviour. when i ran my program thru Windows command prompt ( which i do daily ) after inputting token, it did not connect to kite server.
But code worked fine within my Code Studio IDE . Not sure if you guys know any such issue and resolution
At this moment my program is working all good. from command prompt as well within IDE.
2019-09-23 13:50:57,012 - 1519 - Failed to place order of SELL_STRANGLE HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
This really critical as I had placed order for strangle and 1 leg was executed and second leg failed and it opened up me to high risk, if I manage to fire fight.
Hope i can get some real good reason why i was getting time outs.
topic can be closed