BithumbAdapters { public static List<Ticker> adaptTickers(BithumbTickersReturn bithumbTickers) { return bithumbTickers.getTickers().entrySet().stream() .map( tickerEntry -> { final CurrencyPair currencyPair = new CurrencyPair(tickerEntry.getKey(), Currency.KRW.getCurrencyCode()); return adaptTicker(tickerEntry.getValue(), currencyPair); }) .collect(Collectors.toList()); } private  BithumbAdapters(); static OrderBook adaptOrderBook(BithumbOrderbook orderbook); static AccountInfo adaptAccountInfo(BithumbAccount account, BithumbBalance balance); static Ticker adaptTicker(BithumbTicker bithumbTicker, CurrencyPair currencyPair); static List<Ticker> adaptTickers(BithumbTickersReturn bithumbTickers); static Trades adaptTransactions(
      List<BithumbTransactionHistory> bithumbTrades, CurrencyPair currencyPair); static Trade adaptTransactionHistory(
      BithumbTransactionHistory trade, CurrencyPair currencyPair); static OpenOrders adaptOrders(List<BithumbOrder> bithumbOrders); static LimitOrder adaptOrder(BithumbOrder order); static UserTrades adaptUserTrades(
      List<BithumbUserTransaction> transactions, CurrencyPair currencyPair); static Order adaptOrderDetail(BithumbOrderDetail order, String id); static CurrencyPair adaptCurrencyPair(String orderCurrency, String paymentCurrency); static final String SEARCH_BUY; static final String SEARCH_SELL; }
@Test public void testAdaptTickers() throws IOException { InputStream is = BithumbAdaptersTest.class.getResourceAsStream( "/org/knowm/xchange/bithumb/dto/marketdata/all-ticker-data.json"); final BithumbTickersReturn bithumbTickersReturn = mapper.readValue(is, BithumbTickersReturn.class); final List<Ticker> tickers = BithumbAdapters.adaptTickers(bithumbTickersReturn); assertThat(tickers).hasSize(3); final Ticker ticker = tickers.get(0); assertThat(ticker.getOpen()).isEqualTo(new BigDecimal("4185000")); assertThat(ticker.getLast()).isEqualTo(new BigDecimal("4297000")); assertThat(ticker.getBid()).isEqualTo(new BigDecimal("4296000")); assertThat(ticker.getAsk()).isEqualTo(new BigDecimal("4297000")); assertThat(ticker.getHigh()).isEqualTo(new BigDecimal("4328000")); assertThat(ticker.getLow()).isEqualTo(new BigDecimal("4137000")); assertThat(ticker.getVwap()).isEqualTo(new BigDecimal("4252435.9159")); assertThat(ticker.getVolume()).isEqualTo(new BigDecimal("3815.4174696")); assertThat(ticker.getTimestamp().getTime()).isEqualTo(1546440191110L); }