My actual issue is that the Kite Web LTP does not match the LTP received through the WebSocket API.
I was trading the current-month NIFTY September Futures. At the same time, I observed:
Kite Web LTP: ₹23,655 WebSocket API LTP: ₹23,563 Difference: 92 points
This was not an isolated or momentary difference. I observed the spread repeatedly, with the difference ranging from approximately 70 to 100 points between the Kite Web interface and the WebSocket API. Why is the Kite Web LTP different from the WebSocket API LTP? And Breake was happing at wrong price
We verified this from our end and did not observe any such significant difference. However, there may be a marginal difference in the data.
The WebSocket data may not exactly match the ticks displayed on the Kite web, as they are powered by different WebSocket streams. You may refer to the similar discussion.
That said, a difference of 70–100 points is significantly larger than what would generally be expected from such a difference in data streams. If the discrepancy is consistently reproducible, we would recommend checking the WebSocket implementation as well.
In particular, please ensure that:
The received ticks are processed immediately and are not being queued or delayed before being used.
The main thread/event loop is not being blocked by any CPU-intensive processing.
The LTP being compared is from the same NIFTY Futures contract and instrument/token.
The application is using the latest tick received for the instrument when verifying the price.
The WebSocket data may not exactly match the ticks displayed on the Kite web, as they are powered by different WebSocket streams. You may refer to the similar discussion.
That said, a difference of 70–100 points is significantly larger than what would generally be expected from such a difference in data streams. If the discrepancy is consistently reproducible, we would recommend checking the WebSocket implementation as well.
In particular, please ensure that: