public static Ticker adaptTicker ( KoinimTicker koinimTicker , CurrencyPair currencyPair ) { if ( ! currencyPair . equals ( new CurrencyPair ( BTC , TRY ) ) ) { throw new NotAvailableFromExchangeException ( ) ; } if ( koinimTicker != null ) { return new Ticker . Builder ( ) . currencyPair ( new CurrencyPair ( BTC , Currency . TRY ) ) . last ( koinimTicker . getSell ( ) ) . bid ( koinimTicker . getBid ( ) ) . ask ( koinimTicker . getAsk ( ) ) . high ( koinimTicker . getHigh ( ) ) . low ( koinimTicker . getLow ( ) ) . volume ( koinimTicker . getVolume ( ) ) . vwap ( koinimTicker . getAvg ( ) ) . build ( ) ; } return null ; }
Adapts a KoinimTicker to a Ticker Object