public static OrderBook adaptOrderBook ( CexIODepth depth , CurrencyPair currencyPair ) { List < LimitOrder > asks = createOrders ( currencyPair , OrderType . ASK , depth . getAsks ( ) ) ; List < LimitOrder > bids = createOrders ( currencyPair , OrderType . BID , depth . getBids ( ) ) ; Date date = new Date ( depth . getTimestamp ( ) * 1000 ) ; return new OrderBook ( date , asks , bids ) ; }
Adapts Cex . IO Depth to OrderBook Object