public static AccountInfo adaptAccountInfo(List<BiboxCoin> coins) { Wallet wallet = adaptWallet(coins); return new AccountInfo(wallet); }
/** 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()); }
private static void generic(AccountService accountService) throws IOException { // Get the account information AccountInfo accountInfo = accountService.getAccountInfo(); System.out.println("AccountInfo as String: " + accountInfo.toString()); }
public AccountInfo mapAccountInfo(AcxAccountInfo accountInfo) { return new AccountInfo( accountInfo.name, new Wallet( accountInfo.accounts.stream().map(this::mapBalance).collect(Collectors.toList()))); }
private static void generic(AccountService accountService) throws IOException { System.out.println("----------GENERIC---------"); Map<Currency, Balance> balances = accountService.getAccountInfo().getWallet().getBalances(); System.out.println(balances); }
private static void generic(AccountService accountService) throws IOException { AccountInfo accountInfo = accountService.getAccountInfo(); System.out.println(accountInfo.toString()); }
public static AccountInfo adaptAccountInfo(List<KucoinCoinBalance> balances) { return new AccountInfo( new Wallet( balances.stream().map(KucoinAdapters::adaptBalance).collect(Collectors.toList()))); }
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)); }
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);*/ }
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); } }
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)); }
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()); }
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)); }
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)); }
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()); }
@Override public AccountInfo getAccountInfo() throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException { return new AccountInfo(CoinoneAdapters.adaptWallet(super.getWallet())); }
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)); }
private static void generic(Exchange lakebtcExchange) throws IOException { AccountInfo accountInfo = lakebtcExchange.getAccountService().getAccountInfo(); System.out.println("Account Info: " + accountInfo.toString()); }
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)); }
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()); }