Websocket Connection Limit ? for full depth (Level 20) market data

Hi Team,

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?

i believe its starts to give error when the count goes above 200 symbols, so probably 4 is the safe limit.

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.

Reference - dhanhq . co/docs/v2/annexure/#data-api-error

tried with 2 symbols per connection, but still as soon as 5th is open, 1st get’s disconnected !