Hi I got this error while placing order HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read time out=7) Never seen this before. Why does this come? Any inputs to avoid this?
so you mean python client (place_order function) of kite terminated the connection when it didn't receive a response within 7 seconds is it? So ideally I could catch this error and retry, correct?
@sujith this is a error message at client end -yes - but client here is Kite place_order function not user written code and server is OMS. My question - Is this exception handling added to place_order function in kite 3? I don't think i saw this error in kite 2. I used to get GATEWAY TIMEOUT error in kite 2 for such situations.. Need to know if GATEWAY TIMEOUT error message has been replaced by this error in kite 3. Do recheck and confirm pls.
There are two things here, one is gateway timeout which occurred because Kite Trade didn't receive any response from the OMS(this is what you are referring to in the above comment) and another one is the above scenario wherein Kite Trade didn't respond within seven seconds. But the second scenario can happen when there is a connection issue at client end or because Kite Trade didn't respond within the 7 seconds.
Since this is happening at client's end even Kite Trade will not have any logs. Do you observe this only for place order or in other API calls also? We will write some script to keep making requests every 30 seconds or one minute tomorrow and check. In the meanwhile, if you see any pattern here, you can let us know.
@sujith thanks for the detail. This happened many times on May 21st for place order api - that's the only direct api call i use outside of KiteTicker. But since then i haven't noticed this issue. I will keep a tab though and revert if i sense something fishy!
got this error today : HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /orders/191223001184318?order_id=191223001184318 (Caused by ConnectTimeoutError (, 'Connection to api.kite.trade timed out. (connect timeout=7)'))
place_order
function not user written code and server isOMS
. My question - Is this exception handling added toplace_order
function in kite 3? I don't think i saw this error in kite 2.I used to get
GATEWAY TIMEOUT
error in kite 2 for such situations.. Need to know ifGATEWAY TIMEOUT
error message has been replaced by this error in kite 3. Do recheck and confirm pls.But the second scenario can happen when there is a connection issue at client end or because Kite Trade didn't respond within the 7 seconds.
Since this is happening at client's end even Kite Trade will not have any logs. Do you observe this only for place order or in other API calls also?
We will write some script to keep making requests every 30 seconds or one minute tomorrow and check.
In the meanwhile, if you see any pattern here, you can let us know.
You can update to the latest version of pykiteconnect. We have released a patch for this.
pip install kiteconnect --upgrade --pre
pip install kiteconnect --upgrade
(, 'Connection to api.kite.trade timed out. (connect timeout=7)'))
You can have look to this thread.