public class PoloniexAdapters {
public static Ticker adaptPoloniexTicker(PoloniexTicker poloniexTicker, CurrencyPair currencyPair) {
PoloniexMarketData marketData = poloniexTicker.getPoloniexMarketData();
BigDecimal last = marketData.getLast();
BigDecimal bid = marketData.getHighestBid();
BigDecimal ask = marketData.getLowestAsk();
BigDecimal high = null;
BigDecimal low = null;
BigDecimal volume = marketData.getQuoteVolume();
Date timestamp = new Date();
return new Ticker.Builder().currencyPair(currencyPair).last(last).bid(bid).ask(ask).high(high).low(low).volume(volume).timestamp(timestamp).build();