Search in sources :

Example 1 with BitstampRippleDepositAddress

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

the class BitstampAccountServiceRaw method withdrawRippleFunds.

public BitstampWithdrawal withdrawRippleFunds(BigDecimal amount, String address, Long destinationTag) throws IOException {
    BitstampRippleDepositAddress addressAndDt;
    // even if tag was not explicitly provided in method call, it can still be there as part of
    // address as addr?dt=tag
    addressAndDt = new BitstampRippleDepositAddress(null, address, destinationTag);
    try {
        BitstampWithdrawal response = bitstampAuthenticatedV2.withdrawXRP(apiKeyForV2Requests, signatureCreatorV2, uuidNonceFactory, timestampFactory, API_VERSION, amount, addressAndDt.getAddress(), addressAndDt.getDestinationTag());
        return checkAndReturnWithdrawal(response);
    } catch (BitstampException e) {
        throw handleError(e);
    }
}
Also used : BitstampWithdrawal(org.knowm.xchange.bitstamp.dto.account.BitstampWithdrawal) BitstampException(org.knowm.xchange.bitstamp.dto.BitstampException) BitstampRippleDepositAddress(org.knowm.xchange.bitstamp.dto.account.BitstampRippleDepositAddress)

Aggregations

BitstampException (org.knowm.xchange.bitstamp.dto.BitstampException)1 BitstampRippleDepositAddress (org.knowm.xchange.bitstamp.dto.account.BitstampRippleDepositAddress)1 BitstampWithdrawal (org.knowm.xchange.bitstamp.dto.account.BitstampWithdrawal)1