Read Timeout Error in the morning hours

prabhbirjuneja
I have a python code which works fine the entire day but I want to run it in morning like around 9:20 to 9:30. For the past few days it has stopped to work, the same code used to work a week earlier. This error occurs when I try to get the ltp of nifty 50 at 9:20. The error is urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7).
Any ideas what is causing this and how can I get rid of it?
  • prabhbirjuneja
    I am using this to get the ltp b = kite.ltp("NSE:NIFTY 50")['NSE:NIFTY 50']['last_price']
  • rakeshr
    urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7).
    Is it only happening around 09:20 to 09:30AM?
    You need to hand this time-out with a re-try. This thread will be of help.
Sign In or Register to comment.