pub fn parse_ws_asset_context(
ctx: &WsActiveAssetCtxData,
instrument: &InstrumentAny,
ts_init: UnixNanos,
) -> Result<(MarkPriceUpdate, Option<IndexPriceUpdate>, Option<FundingRateUpdate>)>Expand description
Parses a WebSocket ActiveAssetCtx message into mark price, index price, and funding rate updates.
This converts Hyperliquid asset context data into Nautilus price and funding rate updates.
Returns a tuple of (MarkPriceUpdate, Option<IndexPriceUpdate>, Option<FundingRateUpdate>).
Index price and funding rate are only present for perpetual contracts.