Hi.
I was running a websocket for last few days. I have subscribed to 200 security_ids and I just had single connection. But since yesterday 2:15 PM I am getting this error “HTTP/1.1 429 Too Many Requests”. So since today morning also I am not able to connect to websocket.
I am getting this now “Too many requests from this IP hence client id is blocked”.
So is my clientID blocked or IP address?
And when my clientID will be unblocked again and I can run a websocket?
And I just had single connection with 200 symbols and it threw error. So due to the reconnection logic code was trying to reconnect every 60 seconds yesterday.
On website it is written that 5 connections with 5000 symbols in each connection is the limit. So why I got this error? Is there any reconnection limit?
@Hardik @PravinJ @Naman @Rahul @Pranita @Prithvi @Sameet @shraddha anyone please help.
Hey @ajay_sanap
Just wrote about this here: Live Market Feed (WebSocket) vs. Market Quote (REST API) on DhanHQ
Do note that the block is at the IP level only. Also, even though only 200 security ID is being subscribed, would request you to check the logic of subscribing/unsubscribing new instruments. If a new connection is being made on every subscription, then this might be a possible reason for too many connection requests.
Hey @Hardik
Thanks for the clarification regarding websocket connection limits.
The issue is now resolved and websocket is working.
Thanks & Regards,
Ajay
1 Like
@ajay_sanap ,
I am alos getting 429 error - WebSocket connection error: server rejected WebSocket connection: HTTP 429
I have a single connection where i subscribe 5 to 200 symbols.
What logic did you use to overcoem this error ?
Thanks
Hi @alok.nayak ,
I am using dhanhq version 2.0.2.
Please check you version, if it is the same. And in your websocket code if you are not mentioning version=“v2”. Please do that. It needs to be passed as input to DhanFeed.
Please see if it helps and reply back.