public static LimitOrder CreateLimit(this MatchedOrder order, string instrument, OrderDirection direction) { return(new LimitOrder { MarketMakerId = order.MarketMakerId, Instrument = instrument, Price = order.Price, Volume = direction == OrderDirection.Buy ? order.LimitOrderLeftToMatch : -order.LimitOrderLeftToMatch }); }
public static MatchedOrderBackendContract ToBackendContract(this MatchedOrder src) { return(new MatchedOrderBackendContract { OrderId = src.OrderId, MarketMakerId = src.MarketMakerId, LimitOrderLeftToMatch = src.LimitOrderLeftToMatch, Volume = src.Volume, Price = src.Price, MatchedDate = src.MatchedDate }); }