public static Ticker adaptTicker ( BTCTurkTicker btcTurkTicker ) { CurrencyPair pair = btcTurkTicker . getPair ( ) ; BigDecimal high = btcTurkTicker . getHigh ( ) ; BigDecimal last = btcTurkTicker . getLast ( ) ; Date timestamp = new Date ( btcTurkTicker . getTimestamp ( ) ) ; BigDecimal bid = btcTurkTicker . getBid ( ) ; BigDecimal volume = btcTurkTicker . getVolume ( ) ; BigDecimal low = btcTurkTicker . getLow ( ) ; BigDecimal ask = btcTurkTicker . getAsk ( ) ; BigDecimal open = btcTurkTicker . getOpen ( ) ; BigDecimal average = btcTurkTicker . getAverage ( ) ; return new Ticker . Builder ( ) . currencyPair ( pair != null ? pair : null ) . last ( last ) . bid ( bid ) . ask ( ask ) . high ( high ) . low ( low ) . vwap ( average ) . open ( open ) . volume ( volume ) . timestamp ( timestamp ) . build ( ) ; }
Adapts a BTCTurkTicker to a Ticker Object