예제 #1
0
        public IOrder CreateMarketOrder(OrderDescription orderDescription)
        {
            // Adapts from the SOR model to the external market gateway one
            var marketGateway = this.gateways[orderDescription.TargetMarketName];

            ApiMarketWay   apiMarketWay   = (orderDescription.OrderWay == Way.Sell) ? ApiMarketWay.Sell : ApiMarketWay.Buy;
            ApiMarketOrder apiMarketOrder = marketGateway.CreateMarketOrder(apiMarketWay, orderDescription.Quantity);

            return(new MarketOrderAdapter(marketGateway, apiMarketOrder));
        }
 public MarketOrderAdapter(ApiMarketGateway marketGateway, ApiMarketOrder apiMarketOrder)
     : base(marketGateway, apiMarketOrder)
 {
     this.apiMarketOrder = apiMarketOrder;
 }