Creating 5 min Candle using websocket API

I'm trying to create a 5 min candle using websocket API and this is my code


But when I compare to with data from historical API or live web chart, there is slight mismatch....


Fyers team, is it possible for you guys to share the logic for creating the 5 min candle using webscoket API?

4 replies