public static Ticker adaptTicker ( CryptonitTicker cryptonitTicker , CurrencyPair currencyPair ) { BigDecimal open = cryptonitTicker . getOpen ( ) ; BigDecimal last = cryptonitTicker . getLast ( ) ; BigDecimal bid = cryptonitTicker . getBid ( ) ; BigDecimal ask = cryptonitTicker . getAsk ( ) ; BigDecimal high = cryptonitTicker . getHigh ( ) ; BigDecimal low = cryptonitTicker . getLow ( ) ; BigDecimal vwap = cryptonitTicker . getVwap ( ) ; BigDecimal volume = cryptonitTicker . getVolume ( ) ; Date timestamp = new Date ( cryptonitTicker . getTimestamp ( ) * 1000L ) ; return new Ticker . Builder ( ) . currencyPair ( currencyPair ) . open ( open ) . last ( last ) . bid ( bid ) . ask ( ask ) . high ( high ) . low ( low ) . vwap ( vwap ) . volume ( volume ) . timestamp ( timestamp ) . build ( ) ; }
Adapts a CryptonitTicker to a Ticker Object