Пример #1
0
        public void Is_Sell_Orders_Deleted_By_Instrument()
        {
            _matchingEngine.SetOrders(new SetOrderModel
            {
                MarketMakerId = _marketMakerId1,
                OrdersToAdd   = new []
                {
                    new LimitOrder {
                        CreateDate = DateTime.UtcNow, Id = "5", Instrument = "EURUSD", MarketMakerId = "1", Price = 1.16M, Volume = -10
                    }
                },
                DeleteByInstrumentsSell = new[] { "EURUSD" }
            });

            var orderBook = _matchingEngine.GetOrderBook("EURUSD");

            Assert.AreEqual(1, orderBook.Sell.Count);
            Assert.AreEqual(1, orderBook.Sell.Count);
            Assert.AreEqual(1, orderBook.Sell.First().Value.Count);
        }
Пример #2
0
 public OrderbooksBackendResponse GetOrderBooks([FromBody] OrderbooksBackendRequest request)
 {
     //TODO: handle different MEs
     return(BackendContractFactory.CreateOrderbooksBackendResponse(_matchingEngine.GetOrderBook(request.Instrument)));
 }