Running Websocket

Hi Team,
Am using python for my Algo. And able to fetch the data from web socket.
But at a time am able to run two strategies only. When I try to run the third one, its throwing error for the previous strategy.
Below are the error details. Please help me in fixing this.

Exception in thread WebSocketClient:
Traceback (most recent call last):
File “C:\Python311\Lib\threading.py”, line 1038, in _bootstrap_inner
self.run()
File “C:\Python311\Lib\threading.py”, line 975, in run
self._target(*self._args, **self._kwargs)
File “C:\Python311\Lib\site-packages\ws4py\websocket.py”, line 531, in run
self.terminate()
File “C:\Python311\Lib\site-packages\ws4py\websocket.py”, line 433, in terminate
self.closed(s.closing.code, s.closing.reason)
TypeError: WsClient.closed() takes 1 positional argument but 3 were given

1 Like

Hello Umadhevid,
Currently you can use only one Web-socket instance, when you try to run another one it throws the above exception, in future there will be option for multiple instances, currently this is limited to only one.

On a regular day, using only one websocket instance itself, I am getting the above error atleast once.
Anyone else face this. Because of this, the prices of subscribed scrips not getting updated and hence stop losses are not getting triggered.

Hi @Venkat ,

Sorry for the delay, the issue has been fixed, please update the python package to 3.0.5 latest