public static void main(String[] args) throws Exception {

    CertHelper.trustAllCerts();

    Exchange exchange = CryptoTradeExampleUtils.createExchange();
    PollingAccountService accountService = exchange.getPollingAccountService();

    generic(accountService);
    raw((CryptoTradeAccountServiceRaw) accountService);
  }
  public static void main(String[] args) throws IOException {

    Exchange ANX = ANXExamplesUtils.createExchange();

    // Interested in the private account functionality (authentication)
    PollingAccountService accountService = ANX.getPollingAccountService();

    // Request a Bitcoin deposit address
    String address = accountService.requestDepositAddress(Currencies.BTC.toString());
    System.out.println("Address to deposit Bitcoins to: " + address);
  }
  public static void main(String[] args) throws IOException {

    String username = args[0];
    String password = args[1];
    String ipAddress = args[2];

    Exchange coinsetter = CoinsetterExamplesUtils.getExchange();
    CoinsetterClientSessionServiceRaw clientSessionService =
        new CoinsetterClientSessionServiceRaw(coinsetter);
    CoinsetterAccountServiceRaw accountService =
        (CoinsetterAccountServiceRaw) coinsetter.getPollingAccountService();
    CoinsetterFinancialTransactionServiceRaw financialTransactionService =
        new CoinsetterFinancialTransactionServiceRaw(coinsetter);

    CoinsetterClientSession clientSession =
        clientSessionService.login(username, password, ipAddress);
    log.info("Client session: {}", clientSession);

    CoinsetterAccountList coinsetterAccounts = accountService.list(clientSession.getUuid());
    for (CoinsetterAccount account : coinsetterAccounts.getAccountList()) {
      log.info("account: {}", account.getAccountUuid());

      CoinsetterAccount a = accountService.get(clientSession.getUuid(), account.getAccountUuid());
      log.info("account: {}", a);

      CoinsetterFinancialTransactionList financialTransactions =
          financialTransactionService.list(clientSession.getUuid(), account.getAccountUuid());
      for (CoinsetterFinancialTransaction transaction :
          financialTransactions.getFinancialTransactionList()) {
        CoinsetterFinancialTransaction t =
            financialTransactionService.get(clientSession.getUuid(), transaction.getUuid());
        log.info("Transaction: {}", t);
      }
    }

    clientSessionService.logout(clientSession.getUuid());
  }