com.xeiam.xchange.examples.loyalbit.LoyalbitAccountDemo 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.loyalbit;
import java.io.IOException;
import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.dto.account.AccountInfo;
import com.xeiam.xchange.loyalbit.service.polling.LoyalbitAccountServiceRaw;
public class LoyalbitAccountDemo {
public static void main(String[] args) throws IOException {
Exchange loyalbitExchange = LoyalbitExampleUtils.createTestExchange();
generic(loyalbitExchange);
raw(loyalbitExchange);
}
private static void generic(Exchange loyalbitExchange) throws IOException {
AccountInfo accountInfo = loyalbitExchange.getPollingAccountService().getAccountInfo();
System.out.println("Account Info: " + accountInfo);
}
private static void raw(Exchange loyalbitExchange) throws IOException {
LoyalbitAccountServiceRaw rawLoyalbitAcctService = (LoyalbitAccountServiceRaw) loyalbitExchange.getPollingAccountService();
System.out.println("Balance Info: " + rawLoyalbitAcctService.getLoyalbitBalance());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy