
org.knowm.xchange.kucoin.KucoinAccountServiceRaw Maven / Gradle / Ivy
package org.knowm.xchange.kucoin;
import static org.knowm.xchange.kucoin.KucoinExceptionClassifier.classifyingExceptions;
import java.io.IOException;
import java.util.List;
import org.knowm.xchange.kucoin.dto.request.ApplyWithdrawApiRequest;
import org.knowm.xchange.kucoin.dto.request.InnerTransferRequest;
import org.knowm.xchange.kucoin.dto.response.AccountBalancesResponse;
import org.knowm.xchange.kucoin.dto.response.AccountLedgersResponse;
import org.knowm.xchange.kucoin.dto.response.ApplyWithdrawResponse;
import org.knowm.xchange.kucoin.dto.response.DepositResponse;
import org.knowm.xchange.kucoin.dto.response.InternalTransferResponse;
import org.knowm.xchange.kucoin.dto.response.Pagination;
import org.knowm.xchange.kucoin.dto.response.WithdrawalResponse;
public class KucoinAccountServiceRaw extends KucoinBaseService {
protected KucoinAccountServiceRaw(KucoinExchange exchange) {
super(exchange);
}
public List getKucoinAccounts() throws IOException {
checkAuthenticated();
return classifyingExceptions(
() -> accountApi.getAccountList(apiKey, digest, nonceFactory, passphrase, null, null));
}
public ApplyWithdrawResponse applyWithdraw(ApplyWithdrawApiRequest req) throws IOException {
checkAuthenticated();
return classifyingExceptions(
() -> withdrawalAPI.applyWithdraw(apiKey, digest, nonceFactory, passphrase, req));
}
public InternalTransferResponse innerTransfer(InnerTransferRequest req) throws IOException {
checkAuthenticated();
return classifyingExceptions(
() -> accountApi.innerTransfer(apiKey, digest, nonceFactory, passphrase, req));
}
public Pagination getAccountLedgers(
String accountId, Long startAt, Long endAt) throws IOException {
checkAuthenticated();
return classifyingExceptions(
() ->
accountApi.getAccountLedgers(
apiKey, digest, nonceFactory, passphrase, accountId, startAt, endAt));
}
public Pagination getWithdrawalsList(
String currency, String status, Long startAt, Long endAt) throws IOException {
checkAuthenticated();
return classifyingExceptions(
() ->
withdrawalAPI.getWithdrawalsList(
apiKey, digest, nonceFactory, passphrase, currency, status, startAt, endAt));
}
public Pagination getDepositList(
String currency, String status, Long startAt, Long endAt) throws IOException {
checkAuthenticated();
return classifyingExceptions(
() ->
depositAPI.getDepositList(
apiKey, digest, nonceFactory, passphrase, currency, status, startAt, endAt));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy