public IOrder CreateLimitOrder(OrderDescription orderDescription) { var marketGateway = this.gateways[orderDescription.TargetMarketName]; ApiMarketWay apiMarketWay = (orderDescription.OrderWay == Way.Sell) ? ApiMarketWay.Sell : ApiMarketWay.Buy; ApiLimitOrder apiLimitOrder = marketGateway.CreateLimitOrder(apiMarketWay, orderDescription.Quantity, orderDescription.OrderPrice, orderDescription.AllowPartialExecution); return(new LimitOrderAdapter(marketGateway, apiLimitOrder)); }
public LimitOrderAdapter(ApiMarketGateway marketGateway, ApiLimitOrder apiLimitOrder) : base(marketGateway, apiLimitOrder) { this.apiLimitOrder = apiLimitOrder; }