public ApiLimitOrder(ApiMarketWay way, int quantity, decimal price, bool allowPartialExecution) { this.Quantity = quantity; this.Price = price; this.AllowPartialExecution = allowPartialExecution; this.Way = way; }
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 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 ApiLimitOrder CreateLimitOrder(ApiMarketWay apiMarketWay, int quantity, decimal price, bool allowPartial) { return(new ApiLimitOrder(apiMarketWay, quantity, price, allowPartial)); }
public ApiMarketOrder CreateMarketOrder(ApiMarketWay way, int quantity) { return(new ApiMarketOrder(way, quantity)); }
public ApiMarketOrder(ApiMarketWay way, int quantity) { this.Quantity = quantity; this.Way = way; }