Skip to main content

Module aggregator

Module aggregator 

Source
Expand description

Roll trade ticks up into candles of an arbitrary timeframe.

Structs§

TickAggregator
Incrementally builds candles out of arriving ticks.
Timeframe
A candle bucket size measured in the same unit as the tick timestamps.

Constants§

MAX_GAP_FILL_CANDLES
Hard cap on the number of placeholder candles a single TickAggregator::push call may emit when gap-fill is enabled. One million minute-candles is roughly 1.9 years of contiguous one-minute bars — orders of magnitude beyond any realistic missing-data window in production while still keeping the resulting Vec<Candle> to well under 50 MB. Any larger gap is treated as malformed input rather than allowed to OOM the process.