Skip to main content

parse_trade_tick

Function parse_trade_tick 

Source
pub fn parse_trade_tick(
    trade: &DerivePublicTrade,
    price_precision: u8,
    size_precision: u8,
    ts_init: UnixNanos,
) -> Result<TradeTick>
Expand description

Parses a public trade message into a Nautilus trade tick.

Pass price and size precision from the instrument definition rather than inferring them from the wire values, since Derive may trim trailing zeroes.

ยงErrors

Returns an error when price, size, or timestamp conversion fails.