Trait trade_aggregation::Aggregator
source · pub trait Aggregator<Candle, T: TakerTrade> {
// Required methods
fn update(&mut self, trade: &T) -> Option<Candle>;
fn unfinished_candle(&self) -> &Candle;
}
Expand description
Defines the needed methods for any online Aggregator
Required Methods§
sourcefn unfinished_candle(&self) -> &Candle
fn unfinished_candle(&self) -> &Candle
Get a reference to an unfinished Candle
.
Accessing a Candle
using this method does not guarantee that the AggregationRule
is respected.
It is generally advised to call update
instead and use the resulting Candle
if its Some
.