org.knowm.xchange.empoex.service.polling.EmpoExAccountService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-empoex Show documentation
Show all versions of xchange-empoex Show documentation
XChange implementation for the EmpoEX Exchange
package org.knowm.xchange.empoex.service.polling;
import java.io.IOException;
import java.math.BigDecimal;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.currency.Currency;
import org.knowm.xchange.dto.account.AccountInfo;
import org.knowm.xchange.empoex.EmpoExAdapters;
import org.knowm.xchange.exceptions.NotAvailableFromExchangeException;
import org.knowm.xchange.service.polling.account.PollingAccountService;
public class EmpoExAccountService extends EmpoExAccountServiceRaw implements PollingAccountService {
/**
* Constructor
*
* @param exchange
*/
public EmpoExAccountService(Exchange exchange) {
super(exchange);
}
@Override
public AccountInfo getAccountInfo() throws IOException {
// TODO empoex also provides "pending" and "held" balances; perhaps they are depositing and frozen?
return new AccountInfo(EmpoExAdapters.adaptBalances(super.getEmpoExBalances().get("available")));
}
@Override
public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException {
throw new NotAvailableFromExchangeException();
}
@Override
public String requestDepositAddress(Currency currency, String... args) throws IOException {
throw new NotAvailableFromExchangeException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy