com.xeiam.xchange.examples.poloniex.account.PoloniexAccountDemo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-examples Show documentation
Show all versions of xchange-examples Show documentation
Provides a set of examples that demonstrate how to use XChange in client applications
The newest version!
package com.xeiam.xchange.examples.poloniex.account;
import java.io.IOException;
import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.examples.poloniex.PoloniexExamplesUtils;
import com.xeiam.xchange.poloniex.service.polling.PoloniexAccountServiceRaw;
import com.xeiam.xchange.service.polling.account.PollingAccountService;
import com.xeiam.xchange.utils.CertHelper;
/**
* @author Zach Holmes
*/
public class PoloniexAccountDemo {
public static void main(String[] args) throws Exception {
CertHelper.trustAllCerts();
Exchange poloniex = PoloniexExamplesUtils.getExchange();
PollingAccountService accountService = poloniex.getPollingAccountService();
generic(accountService);
raw((PoloniexAccountServiceRaw) accountService);
}
private static void generic(PollingAccountService accountService) throws IOException {
System.out.println("----------GENERIC----------");
System.out.println(accountService.requestDepositAddress("BTC"));
System.out.println(accountService.getAccountInfo());
}
private static void raw(PoloniexAccountServiceRaw accountService) throws IOException {
System.out.println("------------RAW------------");
System.out.println(accountService.getDepositAddress("BTC"));
System.out.println(accountService.getWallets());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy