public static OrderBook adaptOrderbook ( BitcoiniumOrderbook bitcoiniumOrderbook , CurrencyPair currencyPair ) { List < LimitOrder > asks = createOrders ( currencyPair , Order . OrderType . ASK , bitcoiniumOrderbook . getAsks ( ) ) ; List < LimitOrder > bids = createOrders ( currencyPair , Order . OrderType . BID , bitcoiniumOrderbook . getBids ( ) ) ; Date date = new Date ( bitcoiniumOrderbook . getBitcoiniumTicker ( ) . getTimestamp ( ) ) ; // Note, this is the timestamp of the piggy-backed Ticker. return new OrderBook ( date , asks , bids ) ; }
Adapts a BitcoiniumOrderbook to a OrderBook Object