use of org.knowm.xchange.independentreserve.dto.auth.AuthAggregate in project XChange by knowm.
the class IndependentReserveAccountServiceRaw method getIndependentReserveBalance.
public IndependentReserveBalance getIndependentReserveBalance() throws IOException {
Long nonce = exchange.getNonceFactory().createValue();
String apiKey = exchange.getExchangeSpecification().getApiKey();
AuthAggregate authAggregate = new AuthAggregate(apiKey, nonce);
authAggregate.setSignature(signatureCreator.digestParamsToString(ExchangeEndpoint.GET_ACCOUNTS, nonce, authAggregate.getParameters()));
IndependentReserveBalance independentReserveBalance = independentReserveAuthenticated.getBalance(authAggregate);
if (independentReserveBalance == null) {
throw new ExchangeException("Error getting balance");
}
return independentReserveBalance;
}
Aggregations