parse_trade_tick

Function parse_trade_tick 

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

§Errors

Returns an error if:

  • The direction is not “buy” or “sell”
  • Decimal conversion fails for price or size