Increase Frequency of data

@Hardik

Hello,
Dhan Team

Greeting of the day!

The frequency of Full data updates received through websockets is very very slow around 1.5 seconds between each update.

Can you push this up to at least 2 times per second

I only streamed data for one security id than too i am receiving the data with such a delay.

-------------------- LOG ------------------------
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:33.939
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:35.544
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:37.146
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:38.952
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:40.553
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:42.154
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:43.763
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:45.359
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:46.963
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:48.765
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:50.372
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:51.974
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:53.772
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:55.375
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:56.990
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:11:58.784
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:00.383
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:01.994
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:03.789
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:05.393
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:06.995
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:08.601
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:10.401
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:12.005
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-21 11:12:13.608

Hello @Tushar11

Can you tell me which instrument had you subscribed to here? Market Data update frequency depends on the updates happening on exchange. Since Full Data consists of Depth as well, the update will not be this slow.

I agree, this cannot be this slow as in this 1.5 sec duration roughly at minimum 15K contracts are traded for this security id, therefore i created this thread.

The requested details are as follow

Instrument: NIFTY 21 NOV 23300 CALL

Security id: 43285

I am using version 2 of dhan API

and adding to this i am not doing any post processing, the current time is printed as soon as the data is received , the code has been sent to you in DM, kindly run and check.

Hello @Tushar11

Even it had been post processing, the data frequency would still be the same, even if delayed timestamps are printed.

Can you try subscribing to more instruments and check then, if the buffer is not reached and delay is there. Ideally, this shouldn’t be the case, as have checked the rate of updates at our end too. Will try to replicate for some other instrument.

Hi, @Hardik

I tried again with security id 42917 – NIFTY 28 NOV 23500 CALL, which is at the money call option at this time, you can try it with any at the money option( which is going to be most volatile and most traded at that time) for nifty or bank nifty you will get the same delayed result.

Initially when the request for connection to websocket is sent we receive a response in under 300ms along with full data we also receive OI data one time , after which the response time is around 1.5 seconds, you can run the code and check it .

The below log is for 42917 – NIFTY 28 NOV 23500 CALL , which i ran today ,

as you can see the Current Time BEFORE START: 2024-11-22 11:15:04.349 and

RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:04.594

The first response is received in under 300 ms along with this we also receive OI data at same time after which the response is delayed to around 1.5 second as visible from the below log.

Request you to run the code yourself (code already shared in your DM) and observe it for 1-2 minutes. you will get the exact same scenario.

------------- LOG--------------
Current Time BEFORE START: 2024-11-22 11:15:04.349

RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:04.594
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:04.594------------- this is for one time OI data
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:06.435
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:08.033
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:09.833
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:11.436
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:13.041
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:14.839
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:16.444
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:18.049
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:19.851
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:21.452
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:23.056
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:24.856
RECEIVED DATA TYPE - Full Data
Current Time: 2024-11-22 11:15:26.460