Search in sources :

Example 1 with GeminiDepositAddressRequest

use of org.knowm.xchange.gemini.v1.dto.account.GeminiDepositAddressRequest in project XChange by knowm.

the class GeminiAccountServiceRaw method requestDepositAddressRaw.

public GeminiDepositAddressResponse requestDepositAddressRaw(Currency currency) throws IOException {
    try {
        String ccy = convertToGeminiCcyName(currency.getCurrencyCode());
        GeminiDepositAddressRequest exchange = new GeminiDepositAddressRequest(String.valueOf(this.exchange.getNonceFactory().createValue()), ccy, null);
        GeminiDepositAddressResponse requestDepositAddressResponse = gemini.requestNewAddress(apiKey, payloadCreator, signatureCreator, ccy, exchange);
        if (requestDepositAddressResponse != null) {
            return requestDepositAddressResponse;
        } else {
            return null;
        }
    } catch (GeminiException e) {
        throw handleException(e);
    }
}
Also used : GeminiDepositAddressResponse(org.knowm.xchange.gemini.v1.dto.account.GeminiDepositAddressResponse) GeminiDepositAddressRequest(org.knowm.xchange.gemini.v1.dto.account.GeminiDepositAddressRequest) GeminiException(org.knowm.xchange.gemini.v1.dto.GeminiException)

Aggregations

GeminiException (org.knowm.xchange.gemini.v1.dto.GeminiException)1 GeminiDepositAddressRequest (org.knowm.xchange.gemini.v1.dto.account.GeminiDepositAddressRequest)1 GeminiDepositAddressResponse (org.knowm.xchange.gemini.v1.dto.account.GeminiDepositAddressResponse)1