Open rajendrasp opened 4 months ago
Its a common error, All the subscribed stocks will close after few minutes.
Why are they closed without app closing the socket or app unsubscribing them? Can the timeout be changed for when they are automatically closed?
it is their server issue.
Subscribe all stock at once.. It is common error. You need to handle this when your connection is closed and call the subscribe method to reopen the connection.
I cannot subscribe to all once since I need to subscribe to different stocks at different time of the day. And re-opening is not working. I am closing the app and starting agin with login and everything. But it still gives me same error for long time. After few mins, it starts working. They should fix this or suggest a valid workaround.
I am using subscribe API from kotak neo for multiple stocks. I subscribe to each stock separately. Out of nowhere, I started getting following error on subscribing -
error from callback <bound method StartServer.on_open of <neo_api_client.HSWebSocketLib.StartServer object at 0x000001CAA3A462D0>>: Connection is already closed.
Following is the log of callbacks -
Kotak Neo 2FA session created successfully [on_open]: The Session has been Opened! [on_close]: The Session has been Closed! [on_open]: The Session has been Opened! [on_open]: The Session has been Opened! The Data has been Un-Subscribed [on_close]: [on_close]: The Session has been Closed!The Session has been Closed!
[OnError]: Connection to remote host was lost. [on_close]: The Session has been Closed! [OnError]: Connection is already closed.
Any idea what might be going wrong here?