Skip to main content

map_last_trade

Function map_last_trade 

Source
pub fn map_last_trade(
    data: &LastTradesData,
    now: Instant,
) -> Option<MarketTrade>
Expand description

Maps a market trade message to a [MarketTrade].

The side is BUY / 1 or SELL / 2. A trade whose side is none of these is dropped (None) rather than guessed, like the REST tape (map_rest_last_trade): a wrong side would corrupt anything built from the stream.