コード例 #1
0
        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));
        }
コード例 #2
0
 public LimitOrderAdapter(ApiMarketGateway marketGateway, ApiLimitOrder apiLimitOrder)
     : base(marketGateway, apiLimitOrder)
 {
     this.apiLimitOrder = apiLimitOrder;
 }