Seems there is a data tick difference between JS Websocket API V3 vs `https://api-t1.fyers.in/data/history`

When I was recording data for NSE:HCC-EQ security
From Websocket for first 5 min:

[
    "2024-09-30T09:15:00.000Z",
    42.38,
    42.61,
    42.17,
    42.26,
    94143
  ]

From Data API for First 5 min:

["2024-09-30T09:15:00.000Z",42.39,42.61,41.76,42.26,756957]

You can see some difference in Open Price, Low Price & Volume (added volume per tick )

Like to know about the data source for Data API?

Any updates on this issue? I like to make a note that issue is not reproducible everyday…

Hey @jWc5sbHvE5

Can we please get the raw logs of the Websocket to check this

Hey @jWc5sbHvE5 I haven’t received any update from your end. I hope your concern has been resolved.

@WWhYB2qrsx, I tried to upload the log but I received validation error. So I have added the log…

My concern is the data feed we receive from websocket API some time it doesn’t exact match with data that I retreived at the end of the day or at trading hour as well using https://api-t1.fyers.in/data/history API.

Is your team using different datasource for websocket & history API?

Hey @jWc5sbHvE5

We have looked at the data and there is a slight variation in the price as the Websocket data is real time and the history API data depends on the resolution , You could use the 5 sec resolution and check to get more accurate data but even in the lowest resolution you will get some variation as there is no set time difference in Socket data , the data is live . If you observe the socket data you will get multiple response within 5 seconds and in History there will be one response per resolution , hence the difference in OHLCV

@WWhYB2qrsx, websocket response have never emited the 41.76 price point but historical API did. Its sad that websocket API is not trust worthy, I need to check for replacement.

@WWhYB2qrsx, I want to make 5 min chart using websocket data feed but due wrong data being posted to websocket API, my final output shows different compared to history API.

Could I get access to log event from websocket? or do we have any source to get 5 min accurate data without any latency while real time?

{"level":"debug","datetime":"2024-10-31T09:45:01.750Z","message":"HSM raw data","data":[{"ltp":73.96,"ltq":268,"cng":7.89,"nc":11.94,"name":"sf","tk":"27297","e":"nse_cm"}],"functionName":"conversion"}

@chirag, are you using websocket API?

can you start a new Discussion thread instead of this one. it has better reply structure. I use websocket pkg