org.knowm.xchange.dto.account.Balance.getTotal()方法的使用及代码示例

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

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

Balance.getTotal介绍

[英]Returns the total amount of the currency in this balance.
[中]

代码示例

代码示例来源:origin: knowm/XChange

private static void generic(AccountService accountService) throws IOException {
 // Get the account information
 AccountInfo accountInfo = accountService.getAccountInfo();
 System.out.println("Account balances: (available / available for withdrawal / total)");
 Wallet wallet = accountInfo.getWallet();
 Map<Currency, Balance> balances = wallet.getBalances();
 for (Map.Entry<Currency, Balance> entry : balances.entrySet()) {
  Balance balance = entry.getValue();
  System.out.format(
    "%s balance: %s / %s / %s\n",
    entry.getKey().getCurrencyCode(),
    balance.getAvailable(),
    balance.getAvailableForWithdrawal(),
    balance.getTotal());
 }
}

代码示例来源:origin: knowm/XChange

public static Builder from(Balance balance) {
 return new Builder()
   .currency(balance.getCurrency())
   .total(balance.getTotal())
   .available(balance.getAvailable())
   .frozen(balance.getFrozen())
   .borrowed(balance.getBorrowed())
   .loaned(balance.getLoaned())
   .withdrawing(balance.getWithdrawing())
   .depositing(balance.getDepositing());
}

代码示例来源:origin: org.knowm.xchange/xchange-core

public static Builder from(Balance balance) {
 return new Builder()
   .currency(balance.getCurrency())
   .total(balance.getTotal())
   .available(balance.getAvailable())
   .frozen(balance.getFrozen())
   .borrowed(balance.getBorrowed())
   .loaned(balance.getLoaned())
   .withdrawing(balance.getWithdrawing())
   .depositing(balance.getDepositing());
}

相关文章