Stitching history with realtime data presents a lot of challenges. e.g. when subscribing to 1-second aggregates I have skip until the next 1-minute period starts, cache newly received 1-sec aggregates for sometime to ensure market data endpoint returns an aggregate for the past minute and only then concatenate history with real-time aggregates. Also, when connection breaks or for whatever reason needs to be reestablished steps above have to be repeated.
Please implement a solution to return cumulative snapshot or emit all aggregates since the start of a minute.
When subscribing to 1-second market data channel at 9:30:30am emit either
one aggregate containing OHLC + volume from 9:30:00 to 9:30:30
all 1-second aggregates from 9:30:00 to 9:30:30
When subscribing to 1-minute market data channel at 9:30:30am emit an aggregate for period 9:29:00 - 9:30:00
Stitching history with realtime data presents a lot of challenges. e.g. when subscribing to 1-second aggregates I have skip until the next 1-minute period starts, cache newly received 1-sec aggregates for sometime to ensure market data endpoint returns an aggregate for the past minute and only then concatenate history with real-time aggregates. Also, when connection breaks or for whatever reason needs to be reestablished steps above have to be repeated.
Please implement a solution to return cumulative snapshot or emit all aggregates since the start of a minute.
When subscribing to 1-second market data channel at 9:30:30am emit either
When subscribing to 1-minute market data channel at 9:30:30am emit an aggregate for period 9:29:00 - 9:30:00