if (length > 0) {
timeStamp = new Date(coinsetterPairs[0].getAsk().getTimeStamp());
asks = new ArrayList<LimitOrder>(length);
bids = new ArrayList<LimitOrder>(length);
for (CoinsetterPair coinsetterPair : coinsetterPairs) {
CoinsetterTrade ask = coinsetterPair.getAsk();
CoinsetterTrade bid = coinsetterPair.getBid();
asks.add(new LimitOrder.Builder(OrderType.ASK, CurrencyPair.BTC_USD).limitPrice(ask.getPrice()).tradableAmount(ask.getSize()).build());
bids.add(new LimitOrder.Builder(OrderType.BID, CurrencyPair.BTC_USD).limitPrice(bid.getPrice()).tradableAmount(bid.getSize()).build());
}
} else {
timeStamp = new Date();
asks = Collections.emptyList();
bids = Collections.emptyList();