/// <summary> /// Cancel order for specified symbol by clientOrderId /// </summary> /// <param name="symbol">Optional parameter to filter active orders by symbol</param> public OrderInformation SetCancelOrder(string clientOrderId, string symbol = "") { CancelOrderResponse response = hitbtcClient.SetCancelOrder(clientOrderId, symbol); OrderInformation result = new OrderInformation() { Id = response.Id, ClientOrderId = response.ClientOrderId, Symbol = response.Symbol, Side = response.Side, Status = response.Status, TypeOrder = response.TypeOrder, TimeInForce = response.TimeInForce, Quantity = response.Quantity, Price = response.Price, CumQuantity = response.CumQuantity, CreatedAt = response.CreatedAt, UpdatedAt = response.UpdatedAt }; return(result); }
public OrderInformation CreateNewOrder(string symbol, string side, double quantity, double price = -1, double stopPrice = -1, string timeInForce = "Day", DateTime expireTime = default, string clientOrderId = null, bool strictValidate = true) { NewOrderResponse response = hitbtcClient.CreateNewOrder(symbol, side, quantity, price, stopPrice, timeInForce, expireTime, clientOrderId, strictValidate); OrderInformation result = new OrderInformation() { Id = response.Id, ClientOrderId = response.ClientOrderId, Symbol = response.Symbol, Side = response.Side, Status = response.Status, TypeOrder = response.TypeOrder, TimeInForce = response.TimeInForce, Quantity = response.Quantity, Price = response.Price, CumQuantity = response.CumQuantity, CreatedAt = response.CreatedAt, UpdatedAt = response.UpdatedAt }; return(result); }