use of org.knowm.xchange.gemini.v1.dto.account.GeminiWithdrawalRequest in project XChange by knowm.
the class GeminiAccountServiceRaw method withdraw.
public String withdraw(Currency currency, BigDecimal amount, String address) throws IOException {
try {
String ccy = convertToGeminiCcyName(currency.getCurrencyCode());
GeminiWithdrawalRequest request = new GeminiWithdrawalRequest(String.valueOf(exchange.getNonceFactory().createValue()), ccy, amount, address);
GeminiWithdrawalResponse withdrawRepsonse = gemini.withdraw(apiKey, payloadCreator, signatureCreator, ccy, request);
return withdrawRepsonse.txHash;
} catch (GeminiException e) {
throw handleException(e);
}
}
Aggregations