I have subscribed for nifty throgh ws.FyersSocket.
fyersSocket = ws.FyersSocket(access_token=tok_sock,data_type=data_type,symbol=symbol)
fyersSocket.subscribe()
But if disconnected from internet it shows "Exception is 'NoneType' object is not subscriptable"
and then
OSError: [WinError 121] The semaphore timeout period has expired
Exception is code = 1006 (connection closed abnormally [internal]), no reason
and program/script stops. My doubts are
- How to handle/catch these internal exceptions and try to reconnect?
- How to subscribe asynchronously?
- Where can I get full documentaion of ws.FyersSocket class and all related classes?