I am facing a recurring issue with the Java SDK API. Whenever the WebSocket disconnects during market hours and reconnects, the feeds I receive are not updating correctly. The LTP for certain tokens remains static and does not change, which directly impacts my algo trading logic for entries and stop-loss triggers.
This is a very serious concern, and unfortunately, it is not the first time I have encountered this issue.
Below are logs from my application for reference:
Logs of my app:
2025-10-03 09:11:28,516 [main] INFO -- WebSocket is connected
2025-10-03 09:31:37,364 [ReadingThread] WARN -- WebSocket is disconnected at: 09:31:37.364
2025-10-03 09:31:37,555 [ReadingThread] INFO -- WebSocket is Re-Connected at: 09:31:37.555
2025-10-03 09:31:37,801 [ReadingThread] INFO -- Started receiving feeds again post reconnection.
As you can see, for token 9822722 and 9822466, the LTP remains fixed at the same value across multiple ticks, whereas the Nifty50 index token (256265) continues to update correctly. This clearly shows that after reconnection, only some of the subscribed tokens receive updated data while others stop refreshing.
At present, the only workaround is to terminate and restart the entire connection process, which is not a viable solution for a live trading environment.
Could you please investigate this issue and let me know:
a) Why the subscribed tokens stop updating post reconnection?
b) What fix or update you are planning to address this problem?
This is severely affecting live trading performance, so I request urgent attention to this matter.
@khatumaaibani There are three modes in the WebSocket subscription; you may refer to the documentation, and let us know the WebSocket subscription mode.