Search in sources :

Example 1 with WithdrawalRequest

use of org.knowm.xchange.bitstamp.dto.account.WithdrawalRequest in project XChange by knowm.

the class BitstampAccountDemo method raw.

private static void raw(BitstampAccountServiceRaw accountService) throws IOException {
    // Get the account information
    BitstampBalance bitstampBalance = accountService.getBitstampBalance();
    System.out.println("BitstampBalance: " + bitstampBalance);
    BitstampDepositAddress depositAddress = accountService.getBitstampBitcoinDepositAddress();
    System.out.println("BitstampDepositAddress address: " + depositAddress);
    final List<DepositTransaction> unconfirmedDeposits = accountService.getUnconfirmedDeposits();
    System.out.println("Unconfirmed deposits:");
    for (DepositTransaction unconfirmedDeposit : unconfirmedDeposits) {
        System.out.println(unconfirmedDeposit);
    }
    final List<WithdrawalRequest> withdrawalRequests = accountService.getWithdrawalRequests(50000000l);
    System.out.println("Withdrawal requests:");
    for (WithdrawalRequest unconfirmedDeposit : withdrawalRequests) {
        System.out.println(unconfirmedDeposit);
    }
    BitstampWithdrawal withdrawResult = accountService.withdrawBitstampFunds(Currency.BTC, new BigDecimal(1).movePointLeft(4), "XXX");
    System.out.println("BitstampBooleanResponse = " + withdrawResult);
}
Also used : BitstampDepositAddress(org.knowm.xchange.bitstamp.dto.account.BitstampDepositAddress) DepositTransaction(org.knowm.xchange.bitstamp.dto.account.DepositTransaction) BitstampWithdrawal(org.knowm.xchange.bitstamp.dto.account.BitstampWithdrawal) BitstampBalance(org.knowm.xchange.bitstamp.dto.account.BitstampBalance) WithdrawalRequest(org.knowm.xchange.bitstamp.dto.account.WithdrawalRequest) BigDecimal(java.math.BigDecimal)

Aggregations

BigDecimal (java.math.BigDecimal)1 BitstampBalance (org.knowm.xchange.bitstamp.dto.account.BitstampBalance)1 BitstampDepositAddress (org.knowm.xchange.bitstamp.dto.account.BitstampDepositAddress)1 BitstampWithdrawal (org.knowm.xchange.bitstamp.dto.account.BitstampWithdrawal)1 DepositTransaction (org.knowm.xchange.bitstamp.dto.account.DepositTransaction)1 WithdrawalRequest (org.knowm.xchange.bitstamp.dto.account.WithdrawalRequest)1