Skip to main content

map_ws_market_data

Function map_ws_market_data 

Source
pub fn map_ws_market_data(
    msg: &MarketDataMessage,
    now: Instant,
    sub: Option<SubscriptionId>,
) -> Option<MappedMarketEvent>
Expand description

Maps a market data WebSocket message to an event.

None for messages that carry no data: subscribe confirmations, error answers, undefined messages, a trade with an unknown side, and a candle message that lacks a ticker, a class code or a price. sub is passed into the result unchanged. The core fills it in.