Getting read time out error ?

tanmay
I am taking live feed from zerodha through kite.ltp method for whole day. Atleast once or twice everyday the code is stopped and ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7) error comes.
I even tried

try:
Your code logic here
except ReadTimeout:
pass

after this too, code sometime stops and error comes that Read timeout is not defined .

Kindly suggest what to do ?
  • rakeshr
    @tanmay
    I am taking live feed from zerodha through kite.ltp method for whole day.
    You can use Websocket streaming as per your requirement. LTP API is not meant for polling throughout the day.
    after this too, code sometime stops and error comes that Read timeout is not defined .
    Can you paste complete error traceback here?
Sign In or Register to comment.