public static Ticker adaptTicker ( ParibuTicker paribuTicker , CurrencyPair currencyPair ) { if ( ! currencyPair . equals ( new CurrencyPair ( BTC , TRY ) ) ) { throw new NotAvailableFromExchangeException ( ) ; } BTC_TL btcTL = paribuTicker . getBtcTL ( ) ; if ( btcTL != null ) { BigDecimal last = btcTL . getLast ( ) ; BigDecimal lowestAsk = btcTL . getLowestAsk ( ) ; BigDecimal highestBid = btcTL . getHighestBid ( ) ; BigDecimal volume = btcTL . getVolume ( ) ; BigDecimal high24hr = btcTL . getHigh24hr ( ) ; BigDecimal low24hr = btcTL . getLow24hr ( ) ; return new Ticker . Builder ( ) . currencyPair ( new CurrencyPair ( BTC , Currency . TRY ) ) . last ( last ) . bid ( highestBid ) . ask ( lowestAsk ) . high ( high24hr ) . low ( low24hr ) . volume ( volume ) . build ( ) ; } return null ; }
Adapts a ParibuTicker to a Ticker Object