use of org.knowm.xchange.bitso.dto.account.BitsoBalance in project XChange by knowm.
the class BitsoAdapters method adaptWallet.
public static Wallet adaptWallet(BitsoBalance bitsoBalance) {
// Adapt to XChange DTOs
Balance mxnBalance = new Balance(Currency.MXN, bitsoBalance.getMxnBalance(), bitsoBalance.getMxnAvailable(), bitsoBalance.getMxnReserved());
Balance btcBalance = new Balance(Currency.BTC, bitsoBalance.getBtcBalance(), bitsoBalance.getBtcAvailable(), bitsoBalance.getBtcReserved());
return Wallet.Builder.from(Arrays.asList(mxnBalance, btcBalance)).build();
}
use of org.knowm.xchange.bitso.dto.account.BitsoBalance in project XChange by knowm.
the class BitsoAccountDemo method raw.
private static void raw(BitsoAccountServiceRaw accountService) throws IOException {
BitsoBalance bitsoBalance = accountService.getBitsoBalance();
System.out.println("Bitso balance: " + bitsoBalance);
BitsoDepositAddress depositAddress = accountService.getBitsoBitcoinDepositAddress();
System.out.println("Bitcoin deposit address: " + depositAddress);
String withdrawResult = accountService.withdrawBitsoFunds(new BigDecimal(1).movePointLeft(4), "XXX");
System.out.println("Bitso withdrawal response = " + withdrawResult);
}
Aggregations