Function parse_bar
Source pub fn parse_bar(
candle: &Candle,
bar_type: BarType,
price_precision: u8,
size_precision: u8,
timestamp_on_close: bool,
ts_init: UnixNanos,
) -> Result<Bar>
Expand description
Parses a dYdX Candle into a Nautilus [Bar].
When timestamp_on_close is true, ts_event is set to bar close time
(started_at + interval). When false, uses the venue-native open time.
ยงErrors
Returns an error if OHLCV or timestamp conversion fails.