pub fn market_trade_from_bytes( quantity_scale: u32, ) -> impl Fn(&[u8]) -> Result<MarketTrade> + Send + Sync + 'static