org.knowm.xchange.dto.account.AccountInfo.<init>()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(34)

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

AccountInfo.<init>介绍

[英]Constructs an AccountInfo.
[中]构造AccountInfo。

代码示例

代码示例来源: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

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

@Override
public AccountInfo getAccountInfo()
  throws ExchangeException, NotAvailableFromExchangeException,
    NotYetImplementedForExchangeException, IOException {
 return new AccountInfo(CoinoneAdapters.adaptWallet(super.getWallet()));
}

代码示例来源: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

@Override
public AccountInfo getAccountInfo() throws IOException {
 try {
  return new AccountInfo(balances(null));
 } catch (LivecoinException e) {
  throw LivecoinErrorAdapter.adapt(e);
 }
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 WexAccountInfo info = getBTCEAccountInfo();
 return new AccountInfo(WexAdapters.adaptWallet(info));
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 DSXAccountInfo info = getDSXAccountInfo();
 return new AccountInfo(DSXAdapters.adaptWallet(info));
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 // need to make 2 calls
 FiatAccount[] quoineFiatAccountInfo = getQuoineFiatAccountInfo();
 List<Wallet> fiatBalances = QuoineAdapters.adapt(quoineFiatAccountInfo);
 BitcoinAccount[] cyptoBalances = getQuoineCryptoAccountInfo();
 List<Wallet> cryptoWallets = QuoineAdapters.adapt(cyptoBalances);
 List<Wallet> all = new ArrayList<>();
 all.addAll(fiatBalances);
 all.addAll(cryptoWallets);
 return new AccountInfo(all);
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 try {
  return new AccountInfo(BittrexAdapters.adaptWallet(getBittrexBalances()));
 } catch (BittrexException e) {
  throw BittrexErrorAdapter.adapt(e);
 }
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 List<Balance> balances = getWallets();
 return new AccountInfo(new Wallet(balances));
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 return new AccountInfo(
   exchange.getExchangeSpecification().getUserName(),
   BTCMarketsAdapters.adaptWallet(getBTCMarketsBalance()));
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 try {
  List<Balance> balances = getBalances();
  return new AccountInfo(new Wallet(balances));
 } catch (CryptopiaException e) {
  throw CryptopiaErrorAdapter.adapt(e);
 }
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 return new AccountInfo(
   HitbtcAdapters.adaptWallet("Main", getMainBalance()),
   HitbtcAdapters.adaptWallet("Trading", getTradingBalance()));
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 CexIOBalanceInfo cexIOAccountInfo = getCexIOAccountInfo();
 return new AccountInfo(
   exchange.getExchangeSpecification().getUserName(),
   CexIOAdapters.adaptWallet(cexIOAccountInfo));
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 return new AccountInfo(
   exchange.getExchangeSpecification().getUserName(),
   BitsoAdapters.adaptWallet(getBitsoBalance()));
}

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

public static AccountInfo adaptAccountInfo(
   BitcoinCoreBalanceResponse available, BitcoinCoreBalanceResponse unconfirmed) {
  BigDecimal total = available.getAmount().add(unconfirmed.getAmount());
  Balance btc = new Balance(Currency.BTC, total, available.getAmount(), unconfirmed.getAmount());
  Wallet wallet = new Wallet(btc);
  return new AccountInfo(wallet);
 }
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 try {
  List<Balance> balances = PoloniexAdapters.adaptPoloniexBalances(getExchangeWallet());
  return new AccountInfo(new Wallet(balances));
 } catch (PoloniexException e) {
  throw PoloniexErrorAdapter.adapt(e);
 }
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 Bl3pAccountInfo.Bl3pAccountInfoData accountInfo =
   this.bl3p.getAccountInfo(apiKey, signatureCreator, nonceFactory).getData();
 return new AccountInfo(
   "" + accountInfo.getUserId(),
   accountInfo.getTradeFee(),
   Bl3pAdapters.adaptBalances(accountInfo.getWallets()));
}

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

@Override
public AccountInfo getAccountInfo() throws IOException {
 BitMarketAccountInfo accountInfo = getBitMarketAccountInfo().getData();
 return new AccountInfo(
   exchange.getExchangeSpecification().getUserName(),
   BitMarketAdapters.adaptWallet(accountInfo.getBalance()));
}

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

public static AccountInfo adaptAccountInfoFutures(OkCoinFuturesUserInfoCross futureUserInfo) {
 OkcoinFuturesFundsCross btcFunds = futureUserInfo.getFunds(Currency.BTC);
 OkcoinFuturesFundsCross ltcFunds = futureUserInfo.getFunds(Currency.LTC);
 OkcoinFuturesFundsCross bchFunds = futureUserInfo.getFunds(Currency.BCH);
 Balance btcBalance = new Balance(BTC, btcFunds.getAccountRights());
 Balance ltcBalance = new Balance(LTC, ltcFunds.getAccountRights());
 Balance bchBalance = new Balance(BCH, bchFunds.getAccountRights());
 return new AccountInfo(new Wallet(zeroUsdBalance, btcBalance, ltcBalance, bchBalance));
}

相关文章

最新文章

更多

AccountInfo类方法