Skip to main content

parse_ws_quote_tick

Function parse_ws_quote_tick 

Source
pub fn parse_ws_quote_tick(
    ticker: &LighterTicker,
    instrument: &InstrumentAny,
    timestamp_ms: u64,
    ts_init: UnixNanos,
) -> Result<Option<QuoteTick>>
Expand description

Parses a Lighter ticker stream payload into a Nautilus [QuoteTick].

Returns Ok(None) if either side carries an empty price/size string, which Lighter emits when one book side is currently uninhabited (no resting orders). A one-sided book cannot be expressed as a [QuoteTick], so the frame is skipped rather than rejected.

ยงErrors

Returns an error if a non-empty bid or ask field cannot be converted.