Skip to main content

parse_order_book_details_instruments

Function parse_order_book_details_instruments 

Source
pub fn parse_order_book_details_instruments(
    registry: &MarketRegistry,
    perp_details: &[LighterPerpOrderBookDetail],
    spot_details: &[LighterSpotOrderBookDetail],
    ts_init: UnixNanos,
) -> Result<Vec<InstrumentAny>>
Expand description

Parses Lighter order book metadata into Nautilus instruments and registers their market ids.

Skips markets with an unsupported market type.

ยงErrors

Returns an error if supported markets are present but no instrument definition can be converted.