pub trait Aggregator<Candle> { fn update(&mut self, trade: &Trade) -> Option<Candle>; }
Defines the needed methods for any online aggregator
Updates the aggregation state with a new trade
trade: the trade information to add to the aggregation process
Some output only when a new candle has been created, otherwise it returns None