Skip to main content

parse_ws_order_book_depth10

Function parse_ws_order_book_depth10 

Source
pub fn parse_ws_order_book_depth10(
    book: &LighterWsOrderBook,
    instrument: &InstrumentAny,
    timestamp_ms: u64,
    ts_init: UnixNanos,
) -> Result<OrderBookDepth10>
Expand description

Parses a full Lighter order book payload into a Nautilus [OrderBookDepth10].

Call this only for snapshot or depth payloads that contain the full visible book. Incremental updates should be parsed as deltas.

ยงErrors

Returns an error if any price or size cannot be converted.