Package com.xeiam.xchange.examples.cryptotrade.account

Source Code of com.xeiam.xchange.examples.cryptotrade.account.CryptoTradeAccountDemo

package com.xeiam.xchange.examples.cryptotrade.account;

import java.io.IOException;

import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.cryptotrade.dto.account.CryptoTradeAccountInfo;
import com.xeiam.xchange.cryptotrade.service.polling.CryptoTradeAccountServiceRaw;
import com.xeiam.xchange.dto.account.AccountInfo;
import com.xeiam.xchange.examples.cryptotrade.CryptoTradeExampleUtils;
import com.xeiam.xchange.service.polling.PollingAccountService;
import com.xeiam.xchange.utils.CertHelper;

public class CryptoTradeAccountDemo {

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

    CertHelper.trustAllCerts();

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

    generic(accountService);
    raw((CryptoTradeAccountServiceRaw) accountService);
  }

  private static void generic(PollingAccountService accountService) throws IOException {

    AccountInfo accountInfo = accountService.getAccountInfo();
    System.out.println(accountInfo);
  }

  private static void raw(CryptoTradeAccountServiceRaw accountService) throws IOException {

    CryptoTradeAccountInfo accountInfo = accountService.getCryptoTradeAccountInfo();
    System.out.println(accountInfo);
  }
}
TOP

Related Classes of com.xeiam.xchange.examples.cryptotrade.account.CryptoTradeAccountDemo

TOP
Copyright © 2018 www.massapi.com. 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.