pub fn bar_spec_to_derive_period(
aggregation: BarAggregation,
step: u64,
) -> Result<u32>Expand description
Maps a Nautilus bar aggregation and step to the Derive period enum value
(bucket size in seconds).
Derive supports the following bucket sizes: 60, 300, 900, 1800, 3600, 14400, 28800, 86400, 604800.
ยงErrors
Returns an error if the aggregation or step has no Derive equivalent.