Skip to main content

parse_candle_bar

Function parse_candle_bar 

Source
pub fn parse_candle_bar(
    candle: &LighterCandle,
    bar_type: BarType,
    instrument: &InstrumentAny,
    ts_init: UnixNanos,
) -> Result<Bar>
Expand description

Parses a Lighter candle into a Nautilus [Bar].

ยงErrors

Returns an error if any price, volume, or timestamp field cannot be converted.