use of org.knowm.xchange.coingi.dto.account.CoingiWithdrawalRequest in project XChange by knowm.
the class CoingiAccountService method withdrawFunds.
@Override
public String withdrawFunds(WithdrawFundsParams p) throws IOException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException {
try {
if (p instanceof DefaultWithdrawFundsParams) {
DefaultWithdrawFundsParams params = (DefaultWithdrawFundsParams) p;
CoingiWithdrawalRequest request = new CoingiWithdrawalRequest().setAddress(params.address).setAmount(params.amount).setCurrency(params.currency.getCurrencyCode().toUpperCase());
return withdraw(request).toString();
}
throw new NotYetImplementedForExchangeException();
} catch (CoingiException e) {
throw CoingiErrorAdapter.adapt(e);
}
}
Aggregations