本文整理了Java中org.knowm.xchange.dto.account.AccountInfo
类的一些代码示例,展示了AccountInfo
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AccountInfo
类的具体详情如下:
包路径:org.knowm.xchange.dto.account.AccountInfo
类名称:AccountInfo
[英]DTO representing account information
Account information is anything particular associated with the user's login
[中]代表帐户信息的DTO
帐户信息是与用户登录相关的任何特定信息
代码示例来源:origin: knowm/XChange
public static AccountInfo adaptAccountInfo(List<BiboxCoin> coins) {
Wallet wallet = adaptWallet(coins);
return new AccountInfo(wallet);
}
代码示例来源:origin: knowm/XChange
/** Gets wallet for accounts which don't use multiple wallets with ids */
public Wallet getWallet() {
if (wallets.size() != 1) {
throw new UnsupportedOperationException(wallets.size() + " wallets in account");
}
return getWallet(wallets.keySet().iterator().next());
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
// Get the account information
AccountInfo accountInfo = accountService.getAccountInfo();
System.out.println("AccountInfo as String: " + accountInfo.toString());
}
代码示例来源:origin: knowm/XChange
public AccountInfo mapAccountInfo(AcxAccountInfo accountInfo) {
return new AccountInfo(
accountInfo.name,
new Wallet(
accountInfo.accounts.stream().map(this::mapBalance).collect(Collectors.toList())));
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
System.out.println("----------GENERIC---------");
Map<Currency, Balance> balances = accountService.getAccountInfo().getWallet().getBalances();
System.out.println(balances);
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
AccountInfo accountInfo = accountService.getAccountInfo();
System.out.println(accountInfo.toString());
}
代码示例来源:origin: knowm/XChange
public static AccountInfo adaptAccountInfo(List<KucoinCoinBalance> balances) {
return new AccountInfo(
new Wallet(
balances.stream().map(KucoinAdapters::adaptBalance).collect(Collectors.toList())));
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService)
throws IOException, InterruptedException {
System.out.println("----------GENERIC---------");
Map<Currency, Balance> balances = accountService.getAccountInfo().getWallet().getBalances();
System.out.println(balances);
TimeUnit.SECONDS.sleep(1);
System.out.println(accountService.requestDepositAddress(Currency.BTC));
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
// Get the account information
AccountInfo accountInfo = accountService.getAccountInfo();
System.out.println("AccountInfo as String: " + accountInfo.toString());
/*
Api not implemented or uses other specification?
String depositAddress = accountService.requestDepositAddress(Currency.BTC);
System.out.println("Deposit address: " + depositAddress);*/
/*
Api not implemented or uses other specification?
String withdrawResult =
accountService.withdrawFunds(Currency.BTC, new BigDecimal(1).movePointLeft(4), "XXX");
System.out.println("withdrawResult = " + withdrawResult);*/
}
代码示例来源:origin: knowm/XChange
public static AccountInfo adaptAccountInfo(final LiquiAccountInfo info) {
final Map<Currency, BigDecimal> funds = info.getFunds().getFunds();
final List<Balance> balances =
funds
.entrySet()
.stream()
.map(entry -> new Balance(entry.getKey(), entry.getValue()))
.collect(Collectors.toList());
final Wallet wallet = new Wallet("Liqui wallet", balances);
return new AccountInfo(wallet);
}
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
Map<Currency, Balance> balances = accountService.getAccountInfo().getWallet().getBalances();
System.out.println(balances.toString());
System.out.println(accountService.requestDepositAddress(Currency.BTC));
}
代码示例来源:origin: knowm/XChange
private static void generic(Exchange exchange) throws IOException {
// Interested in the private account functionality (authentication)
AccountService accountService = exchange.getAccountService();
// Get the account information
AccountInfo accountInfo = accountService.getAccountInfo();
System.out.println("Wex AccountInfo as String: " + accountInfo.toString());
}
代码示例来源:origin: knowm/XChange
public static AccountInfo adaptAccountInfo(VircurexAccountInfoReturn vircurexAccountInfo) {
List<Balance> balances = new ArrayList<>();
Map<String, Map<String, BigDecimal>> funds = vircurexAccountInfo.getAvailableFunds();
for (String lcCurrency : funds.keySet()) {
Currency currency = Currency.getInstance(lcCurrency.toUpperCase());
// TODO does vircurex offer total balance as well? the api page lists two output keys
balances.add(new Balance(currency, null, funds.get(lcCurrency).get("availablebalance")));
}
return new AccountInfo(new Wallet(balances));
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
System.out.println("----------GENERIC---------");
Map<Currency, Balance> balances = accountService.getAccountInfo().getWallet().getBalances();
System.out.println(balances);
System.out.println(accountService.requestDepositAddress(Currency.BTC));
}
代码示例来源:origin: knowm/XChange
private static void generic(Exchange exchange) throws IOException {
AccountService accountService = exchange.getAccountService();
AccountInfo accountInfo = accountService.getAccountInfo();
System.out.println("DSX AccountInfo as String: " + accountInfo.toString());
}
代码示例来源:origin: knowm/XChange
@Override
public AccountInfo getAccountInfo()
throws ExchangeException, NotAvailableFromExchangeException,
NotYetImplementedForExchangeException, IOException {
return new AccountInfo(CoinoneAdapters.adaptWallet(super.getWallet()));
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
System.out.println("----------GENERIC---------");
Map<Currency, Balance> balances = accountService.getAccountInfo().getWallet().getBalances();
System.out.println(balances);
System.out.println(accountService.requestDepositAddress(Currency.BTC));
}
代码示例来源:origin: knowm/XChange
private static void generic(Exchange lakebtcExchange) throws IOException {
AccountInfo accountInfo = lakebtcExchange.getAccountService().getAccountInfo();
System.out.println("Account Info: " + accountInfo.toString());
}
代码示例来源:origin: knowm/XChange
public static AccountInfo adaptVaultoroBalances(List<VaultoroBalance> vaultoroBalances) {
List<Balance> balances = new ArrayList<>();
for (VaultoroBalance vaultoroBalance : vaultoroBalances) {
balances.add(adaptVaultoroBalance(vaultoroBalance));
}
return new AccountInfo(new Wallet(balances));
}
代码示例来源:origin: knowm/XChange
private static void generic(AccountService accountService) throws IOException {
AccountInfo accountInfo = accountService.getAccountInfo();
System.out.println("Wallet: " + accountInfo);
System.out.println(
"ETH balance: " + accountInfo.getWallet().getBalance(Currency.ETH).getAvailable());
}
内容来源于网络,如有侵权,请联系作者删除!