Skip to main content

parse_kline

Function parse_kline 

Source
pub fn parse_kline(
    msg: &BinanceSpotKlineMsg,
    instrument: &InstrumentAny,
    ts_init: UnixNanos,
) -> Result<Option<Bar>>
Expand description

Parses a kline message into a closed Bar.

Returns None if the kline is not closed yet.

ยงErrors

Returns an error if any OHLCV field cannot be parsed.