com.xeiam.xchange.examples.anx.v2.account.BitcoinDepositAddressDemo 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.anx.v2.account;
import java.io.IOException;
import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.currency.Currencies;
import com.xeiam.xchange.examples.anx.v2.ANXExamplesUtils;
import com.xeiam.xchange.service.polling.account.PollingAccountService;
/**
* Demo requesting account info at ANX
*/
public class BitcoinDepositAddressDemo {
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);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy