I’m testing out a setup where I use the Intraday API to fetch historical 1-minute data (around 200 candles), and then update it live using the WebSocket feed.
Has anyone tried this combo for short-term strategies?
Is the transition from historical to live data smooth, or are there issues like data overlap or delays?
Would love to hear how others are handling this. Thanks!
Yeah, I’ve been running a similar setup for my FX scalping bot. The key is syncing the last candle from the historical data with the incoming WebSocket data — otherwise you’ll get a gap or duplication. I trim the last historical candle if its timestamp matches the first tick from the socket.
Been using this for a few months. No major issues as long as you buffer ticks for 1–2 seconds before appending to your dataset. That helps reduce the noise and avoids bugs from out-of-order ticks.
Just be careful with weekend gaps. Sometimes the WebSocket feed starts before the API has updated, especially Sunday night. I usually do a fresh API pull first thing Monday just to be sure.