Package com.xeiam.xchange

Examples of com.xeiam.xchange.ExchangeException


    if (returnObject.getError() != null) {
      throw new BTCChinaExchangeException(returnObject.getError());
    }
    else if (returnObject.getResult() == null) {
      throw new ExchangeException("Null data returned");
    }
    return returnObject;
  }
View Full Code Here


    try {
      HitbtcBalanceResponse hitbtcBalance = hitbtc.getHitbtcBalance(signatureCreator, valueFactory, apiKey);
      return hitbtcBalance.getBalances();
    } catch (HitbtcException e) {
      throw new ExchangeException(e.getMessage());
    }
  }
View Full Code Here

    try {
      HitbtcBalanceResponse hitbtcBalanceResponse = hitbtc.getHitbtcBalance(signatureCreator, valueFactory, apiKey);
      return hitbtcBalanceResponse;
    } catch (HitbtcException e) {
      throw new ExchangeException(e.getMessage());
    }
  }
View Full Code Here

    if (!myFunds.isError()) {
      // TODO move to adapter class
      return new AccountInfo(exchangeSpecification.getUserName(), Arrays.asList(new Wallet("BTC", myFunds.getTotalBTC()), new Wallet("USD", myFunds.getTotalUSD())));
    }
    else {
      throw new ExchangeException("Error calling getAccountInfo(): " + myFunds.getError());
    }
  }
View Full Code Here

    if (!campBXResponse.isError()) {
      return campBXResponse.getSuccess();
    }
    else {
      throw new ExchangeException("Error calling withdrawFunds(): " + campBXResponse.getError());
    }
  }
View Full Code Here

  public static Date parseDate(String dateString) {

    try {
      return DATE_FORMAT.parse(dateString);
    } catch (ParseException e) {
      throw new ExchangeException("Illegal date/time format", e);
    }
  }
View Full Code Here

    if (!campBXResponse.isError()) {
      return campBXResponse.getSuccess();
    }
    else {
      throw new ExchangeException("Error calling requestBitcoinDepositAddress(): " + campBXResponse.getError());
    }
  }
View Full Code Here

    long sinceTimestamp = 0;

    if (args.length > 0) {
      Object arg0 = args[0];
      if (!(arg0 instanceof Number)) {
        throw new ExchangeException("arg[0] must be a Number used to represent an epoch timestamp in seconds from which to retreive trades since.");
      }
      sinceTimestamp = ((Number) arg0).longValue();
    }

    List<CryptoTradePublicTrade> publicTradeHistory = sinceTimestamp == 0 ? super.getCryptoTradeTradeHistory(currencyPair) : super.getCryptoTradeTradeHistory(currencyPair, sinceTimestamp);
View Full Code Here

        else {
          anxDepthWrapper = getANXPartialOrderBook(currencyPair);
        }
      }
      else {
        throw new ExchangeException("Orderbook type argument must be a String!");
      }
    }
    else { // default to full orderbook
      anxDepthWrapper = getANXFullOrderBook(currencyPair);
    }
View Full Code Here

    try {
      ANXOpenOrderWrapper anxOpenOrderWrapper = anxV2.getOpenOrders(ANXUtils.urlEncode(exchangeSpecification.getApiKey()), signatureCreator, getNonce(), baseCurrency, counterCurrency);
      return anxOpenOrderWrapper.getANXOpenOrders();
    } catch (ANXException e) {
      throw new ExchangeException("Error calling getOpenOrders(): " + e.getError(), e);
    }
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.ExchangeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.