Example #1
0
 public async Task <ExchangeResult <TradeResult> > ExecuteTradeAsync(CurrencyPair currencyPair,
                                                                     TradeType tradeType, double price, double ammount)
 {
     return(await ExecuteTradeAsync(currencyPair, tradeType, price, ammount, null).ConfigureAwait(false));
 }
Example #2
0
        // =============================================================================================================
        // API
        // =============================================================================================================

        public async Task <ExchangeResult <CancelResult> > ExecuteCancelAsync(long orderId, CurrencyPair currencyPair = null, bool isToken = false)
        {
            var message = $"&order_id={orderId}" +
                          (currencyPair != null ? $"&currency_pair = {currencyPair}" : "") +
                          $"&is_token={isToken.ToString().ToLower()}";
            var json = await DoCommandAsync("cancel_order", message).ConfigureAwait(false);

            return(new ExchangeResult <CancelResult>(json));
        }