private static void raw(CoinoneAccountServiceRaw accountService) throws IOException { CoinoneBalancesResponse coinoneBalancesResponse = accountService.getWallet(); System.out.println("Coinone Avail Balance: " + coinoneBalancesResponse.getEth().getAvail()); System.out.println("Coinone total Balance: " + coinoneBalancesResponse.getEth().getBalance()); } }
public static Wallet adaptWallet(CoinoneBalancesResponse coninoneResponse) { if (!"0".equals(coninoneResponse.getErrorCode())) { throw new CoinoneException(coninoneResponse.getResult()); new Balance( Currency.getInstance("KRW"), coninoneResponse.getKrw().getBalance(), coninoneResponse.getKrw().getAvail())); balances.add( new Balance( Currency.getInstance("BCH"), coninoneResponse.getBch().getBalance(), coninoneResponse.getBch().getAvail())); balances.add( new Balance( Currency.getInstance("BTG"), coninoneResponse.getBtg().getBalance(), coninoneResponse.getBtg().getAvail())); balances.add( new Balance( Currency.getInstance("IOTA"), coninoneResponse.getIota().getBalance(), coninoneResponse.getIota().getAvail())); balances.add( new Balance( Currency.getInstance("EOS"), coninoneResponse.getEos().getBalance(), coninoneResponse.getEos().getAvail())); balances.add( new Balance(
public CoinoneBalancesResponse getWallet() throws CoinoneException, IOException { CoinoneBalancesRequest request = new CoinoneBalancesRequest(apiKey, exchange.getNonceFactory().createValue()); CoinoneBalancesResponse response = coinone.getWallet(payloadCreator, signatureCreator, request); return response; }
public CoinoneWithdrawResponse withdrawFund( Currency currency, BigDecimal amount, String address, String authNumber) throws CoinoneException, IOException { CoinoneWithdrawRequest request = new CoinoneWithdrawRequest( apiKey, exchange.getNonceFactory().createValue(), currency.getSymbol().toLowerCase(), authNumber, amount.doubleValue(), address); CoinoneWithdrawResponse response = coinone.withdrawFund(payloadCreator, signatureCreator, request); return response; } }