nautilus_model::data::bar

Function get_bar_interval

source
pub fn get_bar_interval(bar_type: &BarType) -> TimeDelta
Expand description

Returns the bar interval as a TimeDelta.

ยงPanics

This function panics:

  • If the aggregation method of the given bar_type is not time based.