org.knowm.xchange.livecoin.service.LivecoinAccountServiceRaw Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-livecoin Show documentation
Show all versions of xchange-livecoin Show documentation
A convenient way to buy and sell Bitcoin
package org.knowm.xchange.livecoin.service;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.knowm.xchange.currency.Currency;
import org.knowm.xchange.dto.account.Wallet;
import org.knowm.xchange.livecoin.Livecoin;
import org.knowm.xchange.livecoin.LivecoinAdapters;
import org.knowm.xchange.livecoin.LivecoinExchange;
import org.knowm.xchange.livecoin.dto.account.LivecoinBalance;
import org.knowm.xchange.livecoin.dto.account.LivecoinPaymentOutResponse;
import org.knowm.xchange.livecoin.dto.account.LivecoinWalletAddressResponse;
import org.knowm.xchange.service.trade.params.DefaultWithdrawFundsParams;
import org.knowm.xchange.utils.DateUtils;
public class LivecoinAccountServiceRaw extends LivecoinBaseService {
public LivecoinAccountServiceRaw(LivecoinExchange exchange) {
super(Livecoin.class, exchange);
}
public Wallet balances(String currency) throws IOException {
List response = service.balances(apiKey, signatureCreator, currency);
return LivecoinAdapters.adaptWallet(response);
}
public String withdraw(DefaultWithdrawFundsParams params) throws IOException {
LivecoinPaymentOutResponse response =
service.paymentOutCoin(
apiKey,
signatureCreator,
params.getCurrency().getCurrencyCode(),
params.getAmount(),
params.getAddress());
return response.getData().get("id").toString();
}
public String walletAddress(Currency currency) throws IOException {
LivecoinWalletAddressResponse response =
service.paymentAddress(apiKey, signatureCreator, currency.getCurrencyCode());
return response.getWallet();
}
public List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy