parse_ws_message_data

Function parse_ws_message_data 

Source
pub fn parse_ws_message_data(
    channel: &OKXWsChannel,
    data: Value,
    instrument_id: &InstrumentId,
    price_precision: u8,
    size_precision: u8,
    ts_init: UnixNanos,
    funding_cache: &mut AHashMap<Ustr, (Ustr, u64)>,
) -> Result<Option<NautilusWsMessage>>
Expand description

Parses OKX WebSocket message payloads into Nautilus data structures.

§Panics

Panics only in the case where okx_channel_to_bar_spec(channel) returns None after a prior is_some check – an unreachable scenario indicating a logic error.