public static Ticker adaptTicker ( BankeraTickerResponse ticker , CurrencyPair currencyPair ) { BigDecimal high = new BigDecimal ( ticker . getTicker ( ) . getHigh ( ) ) ; BigDecimal low = new BigDecimal ( ticker . getTicker ( ) . getLow ( ) ) ; BigDecimal bid = new BigDecimal ( ticker . getTicker ( ) . getBid ( ) ) ; BigDecimal ask = new BigDecimal ( ticker . getTicker ( ) . getAsk ( ) ) ; BigDecimal last = new BigDecimal ( ticker . getTicker ( ) . getLast ( ) ) ; BigDecimal volume = new BigDecimal ( ticker . getTicker ( ) . getVolume ( ) ) ; Date timestamp = new Date ( ticker . getTicker ( ) . getTimestamp ( ) ) ; return new Ticker . Builder ( ) . currencyPair ( currencyPair ) . high ( high ) . low ( low ) . bid ( bid ) . ask ( ask ) . last ( last ) . volume ( volume ) . timestamp ( timestamp ) . build ( ) ; }
Adapts Bankera BankeraTickerResponse to a Ticker