Skip to main content

resample_by_interval

Function resample_by_interval 

Source
pub fn resample_by_interval(
    candles: &[Candle],
    interval: i64,
) -> Result<Vec<Candle>>
Expand description

Resample candles by a timestamp interval: candles whose time falls in the same floor(time / interval) bucket are aggregated, and the bucket adopts the floored start time. Input must be time-ordered; interval must be non-zero.