com.xeiam.xchange.dto.account.AccountInfo.getWallets()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中com.xeiam.xchange.dto.account.AccountInfo.getWallets()方法的一些代码示例,展示了AccountInfo.getWallets()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AccountInfo.getWallets()方法的具体详情如下:
包路径:com.xeiam.xchange.dto.account.AccountInfo
类名称:AccountInfo
方法名:getWallets

AccountInfo.getWallets介绍

暂无

代码示例

代码示例来源:origin: aido/AidoATP

private void updateBooks() {
  wallets = accountInfo.getWallets();
  for(Wallet wallet : wallets){
    CurrencyUnit currency = wallet.getBalance().getCurrencyUnit();
    //Do we have a new currency in our wallet?
    if(!books.containsKey(currency)){
      //Make some space for it.
      books.put(currency,new ArrayList<BigMoney>());
    }
    ArrayList<BigMoney> ledger = books.get(currency);
    ledger.add(wallet.getBalance());
  }
}

代码示例来源:origin: aido/AidoATP

public BigMoney getBalance(CurrencyUnit currency) throws WalletNotFoundException{
  refreshAccounts();
  wallets = accountInfo.getWallets();
  for(Wallet wallet : wallets){
    BigMoney balance = wallet.getBalance();
    CurrencyUnit unit = balance.getCurrencyUnit();
    if(unit.equals(currency)){
      return balance;
    }
  }
  log.error("ERROR: Could not find a {} wallet for the currency {}. Exiting now!",exchangeName,currency);
  throw new WalletNotFoundException();
}

代码示例来源:origin: aido/AidoATP

public synchronized void refreshAccounts() {
  accountInfo = accountService.getAccountInfo();
  updateBooks();
  ProfitLossAgent.getInstance().updateBalances(accountInfo.getWallets());
}

代码示例来源:origin: com.xeiam.xchange/xchange-coinfloor

List<Wallet> oldWallets = cachedAccountInfo.getWallets();
for (Wallet wallet : oldWallets) {
 if (wallet.getCurrency().equals(rawRetObj.getAsset())) {

相关文章

微信公众号

最新文章

更多