Delay in websocket data v3

@Pradeep_Jaiswar I see delays even after using the Market Data Feed V3
The ltps are coming with 1-3 seconds delay and sometime as much as 8 second delays
It is very hard to work with such inconsistent data.

print(InstrumentName() + " ltpcTimeDiff " + (System.currentTimeMillis() - ltpc.getLtt()) + " ltp: " + ltpc.getLtp() + " totalTimeDiff: "+ (System.currentTimeMillis() - feedResponse.getCurrentTs()) +
" time: " + LocalDateTime.now().format(DATE_TIME_MS_FORMATTER)))
bel ltpcTimeDiff 125 ltp: 280.6 totalTimeDiff: 1 time: 2025-02-04 10:25:00.043
coforge ltpcTimeDiff 2565 ltp: 8424.15 totalTimeDiff: 2 time: 2025-02-04 10:25:00.194
indigo ltpcTimeDiff 2050 ltp: 4351.4 totalTimeDiff: 2 time: 2025-02-04 10:25:00.194
hindcooper ltpcTimeDiff 1012 ltp: 241.0 totalTimeDiff: 2 time: 2025-02-04 10:25:00.194
sail ltpcTimeDiff 992 ltp: 105.74 totalTimeDiff: 2 time: 2025-02-04 10:25:00.194
hall tpcTimeDiff 315 ltp: 3670.0 totalTimeDiff: 2 time: 2025-02-04 10:25:00.194
policybzr ltpcTimeDiff 3016 ltp: 1697.7 totalTimeDiff: 2 time: 2025-02-04 10:25:00.194
indigo ltpcTimeDiff 3400 ltp: 4351.4 totalTimeDiff: 2 time: 2025-02-04 10:25:01.544
hindcooper ltpcTimeDiff 2962 ltp: 241.0 totalTimeDiff: 2 time: 2025-02-04 10:25:02.144
1 Like

@Ketan
Can you respond to this?
Why is there so much delay even in the websockets?

1 Like

Hi @Kautilya
From our side, we do not observe any such delays. If there were a delay of 1-3 seconds in the LTP from the server side, all users would experience a similar delay.

Kindly check your local network speed and code setup for any potential issues.

Additionally, please share the instrument keys and the specific time when you encountered the delay so that we can verify it on our end as well.

Thanks!

Hi @Ketan, Thank you for your response
As you can observe from the logs I have mentioned
The time difference is not in the received time and processsing time(System.currentTimeMillis() - feedResponse.getCurrentTs()), Received time is mostly less than 3ms.
While the difference in time is from LTPC time LTT(System.currentTimeMillis() - ltpc.getLtt()), Here the time difference is some times 1-3 seconds

I am observing this everyday, when I am trying to make the 5 minute candle from the previous minute candle, instead of getting the close price before 10:25:00.000 I am getting data somewhere between 10:25:00.040 - 10:25:02.144
I am pasted the logs as well in the original post
I am observing this in these instrument keys
NSE_EQ|INE263A01024
NSE_EQ|INE591G01017
NSE_EQ|INE646L01027
NSE_EQ|INE531E01026
NSE_EQ|INE114A01011
NSE_EQ|INE066F01020
NSE_EQ|INE417T01026

@Ketan Please help me here
What could be wrong if the ltt time compared to current time is delayed while currentTs still is not delayed at all

@Kautilya - Weā€™re looking into this and will get back to you with an update. Thanks!

1 Like

@shanmu @Ketan
Iā€™m experiencing a consistent issue with data delays in at least one of the instruments mentioned above. This occurs approximately every 5 minutes and is preventing me from accurately calculating 5-minute candles. This, in turn, is causing my trading strategy to fail. I need a resolution to this problem as soon as possible. Are there any updates or solutions available?

@Kautilya - Are you still seeing this issue today? Iā€™m asking because we deployed a fix for v3 yesterday to address a similar issue.

@shanmu Yes I am still facing the same issue
These are the logs of the data that is delayed, this data is suppose to come before 11:40:00 but is delayed by the ltpcTimeDiff amount of milliseconds

niftybank_5mins ltpcTimeDiff 1101 ltp: 49098.35 totalTimeDiff: 2 time: 2025-02-12 11:40:00.101
coforge_5mins ltpcTimeDiff 215 ltp: 8020.65 totalTimeDiff: 6 time: 2025-02-12 11:40:00.105
hindcooper_5mins ltpcTimeDiff 508 ltp: 225.64 totalTimeDiff: 6 time: 2025-02-12 11:40:00.105
indigo_5mins ltpcTimeDiff 2242 ltp: 4265.2 totalTimeDiff: 2 time: 2025-02-12 11:40:00.401
adanient_5mins ltpcTimeDiff 2427 ltp: 2332.0 totalTimeDiff: 2 time: 2025-02-12 11:40:01.151
adanient_5mins ltpcTimeDiff 3176 ltp: 2332.0 totalTimeDiff: 1 time: 2025-02-12 11:40:01.900
adanient_5mins ltpcTimeDiff 4377 ltp: 2332.0 totalTimeDiff: 2 time: 2025-02-12 11:40:03.101
hindalco_5mins ltpcTimeDiff 7443 ltp: 597.95 totalTimeDiff: 1 time: 2025-02-12 11:40:03.700
adanient_5mins ltpcTimeDiff 5426 ltp: 2332.0 totalTimeDiff: 1 time: 2025-02-12 11:40:04.150
adanient_5mins ltpcTimeDiff 6476 ltp: 2332.0 totalTimeDiff: 1 time: 2025-02-12 11:40:05.200