public BitfinexCancelReplaceOrderResponse CancelReplaceOrder(int cancelOrderId, BitfinexNewOrderPost newOrder) { var replaceOrder = new BitfinexCancelReplacePost() { Amount = newOrder.Amount, CancelOrderId = cancelOrderId, Exchange = newOrder.Exchange, Price = newOrder.Price, Side = newOrder.Side, Symbol = newOrder.Symbol, Type = newOrder.Type }; return(CancelReplaceOrder(replaceOrder)); }
public BitfinexCancelReplaceOrderResponse CancelReplaceOrder(BitfinexCancelReplacePost replaceOrder) { replaceOrder.Request = OrderCancelRequestUrl + CancelReplaceRequestUrl; replaceOrder.Nonce = Common.UnixTimeStampUtc().ToString(CultureInfo.InvariantCulture); var response = GetRestResponse(replaceOrder); var replaceOrderResponseObj = JsonConvert.DeserializeObject <BitfinexCancelReplaceOrderResponse>(response); replaceOrderResponseObj.OriginalOrderId = replaceOrder.CancelOrderId; Log.Info("Cancel Replace: {0}"); Log.Info("Response From Exchange: {0}", replaceOrderResponseObj.ToString()); return(replaceOrderResponseObj); }
public virtual BitfinexCancelReplaceOrderResponse CancelReplaceOrder(BitfinexCancelReplacePost replaceOrder) { replaceOrder.Request = OrderCancelRequestUrl + CancelReplaceRequestUrl; replaceOrder.Nonce = Common.UnixTimeStampUtc().ToString(); var client = GetRestClient(replaceOrder.Request); var response = GetRestResponse(client, replaceOrder); var replaceOrderResponseObj = JsonConvert.DeserializeObject <BitfinexCancelReplaceOrderResponse>(response.Content); replaceOrderResponseObj.OriginalOrderId = replaceOrder.CancelOrderId; Log.Trace(string.Format("BitfinexApi.CancelReplaceOrder(): {0}")); Log.Trace(string.Format("BitfinexApi.CancelReplaceOrder(): Response From Exchange: {0}", replaceOrderResponseObj.ToString())); return(replaceOrderResponseObj); }
public Task <BitfinexCancelReplaceOrderResponse> CancelReplaceOrderAsync(BitfinexCancelReplacePost replaceOrder) { return(Task.Run(() => CancelReplaceOrder(replaceOrder))); }