Skip to main content

parse_ws_mark_price_update

Function parse_ws_mark_price_update 

Source
pub fn parse_ws_mark_price_update(
    stats: &LighterMarketStats,
    instrument: &InstrumentAny,
    timestamp_ms: u64,
    ts_init: UnixNanos,
) -> Result<MarkPriceUpdate>
Expand description

Parses a Lighter perpetual market-stat update into a mark price update.

ยงErrors

Returns an error if the mark price or timestamp cannot be converted.