public async Task <OrderMarketIfTouched> UpdateOrder(long orderId, int?units, float?price, DateTime?expiry, float?lowerBound, float?upperBound, float?stopLoss, float?takeProfit, int?trailingStop) { Dictionary <string, string> routeParams = new Dictionary <string, string>(); routeParams.Add("accountId", _accountId.ToString()); routeParams.Add("orderId", orderId.ToString()); Dictionary <string, string> properties = new Dictionary <string, string>(); if (units != null) { properties.Add("units", units.ToString()); } if (expiry != null) { properties.Add("expiry", expiry.Value.ToString("o")); } if (price != null) { properties.Add("price", price.ToString()); } if (lowerBound != null) { properties.Add("lowerBound", lowerBound.ToString()); } if (upperBound != null) { properties.Add("upperBound", upperBound.ToString()); } if (takeProfit != null) { properties.Add("takeProfit", takeProfit.ToString()); } if (trailingStop != null) { properties.Add("trailingStop", trailingStop.ToString()); } OrderMarketIfTouched orderMarketIfTouched = await Patch <OrderMarketIfTouched>(routeParams, properties, _orderRoute); return(orderMarketIfTouched); }
public async Task UpdateOrderTest() { OrderMarketIfTouched order = await _orderEndpoints.UpdateOrder(965436841, 333, 1.1f, null, null, null, null, null, null); Assert.IsNotNull(order); }