I am trying to build an algo, where it listens to websocket for 20 level depth , each connection with a limit of 50 securities. When i am trying to connect 5 connections, it always disconnects the oldest connection. This is not in line with the Dhan documentation, where it says 5 WS connections. Can you please confirm if the limit for 20 depth is 4 or 5?
Check if the disconnected websocket has last message: { “ResponseCode” : 805 // Too many requests or connections. Further requests may result in the user being blocked. }
If not, your code might be closing the connection as a safety measure. May be an incorrect loop counter.