public static OrderExecutionOrderBook ToDomain(this OrderExecutionOrderBookContract contract)
        {
            var orderBook = new OrderExecutionOrderBook
            {
                OrderId         = contract.OrderId,
                ExternalOrderId = contract.ExternalOrderId,
                OrderBook       = new ExternalOrderBook
                {
                    ExchangeName = contract.OrderBook.ExchangeName,
                    AssetPairId  = contract.OrderBook.AssetPairId,
                    Timestamp    = contract.OrderBook.Timestamp,
                    Asks         = contract.OrderBook.Asks.Select(x => new VolumePrice {
                        Volume = x.Volume, Price = x.Price
                    }).ToList(),
                    Bids = contract.OrderBook.Bids.Select(x => new VolumePrice {
                        Volume = x.Volume, Price = x.Price
                    }).ToList(),
                },
            };

            orderBook.Spread = SpreadCalculator.CalculateSpread(orderBook, contract.Volume);

            return(orderBook);
        }
 public decimal Spread_Calculation_Success(OrderExecutionOrderBook orderExecutionOrderBook, decimal volume)
 {
     return(SpreadCalculator.CalculateSpread(orderExecutionOrderBook, volume));
 }