Hi everyone,
I’m working on a project that uses the Upstox WebSocket API to stream live Nifty 50 LTP data. I’ve implemented the connection using the official sample code provided in the Upstox Developer Docs, and the connection is successfully established.
However, I’m consistently seeing latency values in the range of 1000–1500ms (occasionally even more), as calculated based on the difference between the data timestamp and the system time when the message is received.
Here’s a snippet from my logs for reference:
2025-05-19 11:09:16,930 | INFO | Connection established
2025-05-19 11:09:16,932 | INFO | Subscription request sent.
2025-05-19 11:09:16,953 | INFO | 2025-05-19 11:09:16.000 - Nifty 50 LTP: 25036.75 | Latency: 952.8 ms
2025-05-19 11:09:17,003 | INFO | 2025-05-19 11:09:16.000 - Nifty 50 LTP: 25036.75 | Latency: 1002.5 ms
2025-05-19 11:09:17,452 | INFO | 2025-05-19 11:09:16.000 - Nifty 50 LTP: 25036.45 | Latency: 1452.3 ms
2025-05-19 11:09:18,052 | INFO | 2025-05-19 11:09:17.000 - Nifty 50 LTP: 25036.0 | Latency: 1052.0 ms
2025-05-19 11:09:18,501 | INFO | 2025-05-19 11:09:17.000 - Nifty 50 LTP: 25036.3 | Latency: 1501.3 ms
2025-05-19 11:09:19,071 | INFO | 2025-05-19 11:09:18.000 - Nifty 50 LTP: 25036.35 | Latency: 1071.1 ms
2025-05-19 11:09:19,568 | INFO | 2025-05-19 11:09:18.000 - Nifty 50 LTP: 25036.05 | Latency: 1568.4 ms
2025-05-19 11:09:20,084 | INFO | 2025-05-19 11:09:19.000 - Nifty 50 LTP: 25035.6 | Latency: 1084.8 ms
Can anyone from the team help me with this?
is anyone able to consistently achive sub 100ms latencies?
Any insights would be appreciated!
Thanks in advance