@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?
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"}