public AccountInfo mapAccountInfo(AcxAccountInfo accountInfo) { return new AccountInfo( accountInfo.name, new Wallet( accountInfo.accounts.stream().map(this::mapBalance).collect(Collectors.toList()))); }
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)); }
@Override public AccountInfo getAccountInfo() throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException { return new AccountInfo(CoinoneAdapters.adaptWallet(super.getWallet())); }
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)); }
@Override public AccountInfo getAccountInfo() throws IOException { try { return new AccountInfo(balances(null)); } catch (LivecoinException e) { throw LivecoinErrorAdapter.adapt(e); } }
@Override public AccountInfo getAccountInfo() throws IOException { WexAccountInfo info = getBTCEAccountInfo(); return new AccountInfo(WexAdapters.adaptWallet(info)); }
@Override public AccountInfo getAccountInfo() throws IOException { DSXAccountInfo info = getDSXAccountInfo(); return new AccountInfo(DSXAdapters.adaptWallet(info)); }
@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); }
@Override public AccountInfo getAccountInfo() throws IOException { try { return new AccountInfo(BittrexAdapters.adaptWallet(getBittrexBalances())); } catch (BittrexException e) { throw BittrexErrorAdapter.adapt(e); } }
@Override public AccountInfo getAccountInfo() throws IOException { List<Balance> balances = getWallets(); return new AccountInfo(new Wallet(balances)); }
@Override public AccountInfo getAccountInfo() throws IOException { return new AccountInfo( exchange.getExchangeSpecification().getUserName(), BTCMarketsAdapters.adaptWallet(getBTCMarketsBalance())); }
@Override public AccountInfo getAccountInfo() throws IOException { try { List<Balance> balances = getBalances(); return new AccountInfo(new Wallet(balances)); } catch (CryptopiaException e) { throw CryptopiaErrorAdapter.adapt(e); } }
@Override public AccountInfo getAccountInfo() throws IOException { return new AccountInfo( HitbtcAdapters.adaptWallet("Main", getMainBalance()), HitbtcAdapters.adaptWallet("Trading", getTradingBalance())); }
@Override public AccountInfo getAccountInfo() throws IOException { CexIOBalanceInfo cexIOAccountInfo = getCexIOAccountInfo(); return new AccountInfo( exchange.getExchangeSpecification().getUserName(), CexIOAdapters.adaptWallet(cexIOAccountInfo)); }
@Override public AccountInfo getAccountInfo() throws IOException { return new AccountInfo( exchange.getExchangeSpecification().getUserName(), BitsoAdapters.adaptWallet(getBitsoBalance())); }
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); } }
@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); } }
@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())); }
@Override public AccountInfo getAccountInfo() throws IOException { BitMarketAccountInfo accountInfo = getBitMarketAccountInfo().getData(); return new AccountInfo( exchange.getExchangeSpecification().getUserName(), BitMarketAdapters.adaptWallet(accountInfo.getBalance())); }
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)); }