}
private static void generic(Exchange exchange) throws IOException {
// Interested in the public polling market data feed (no authentication)
PollingMarketDataService marketDataService = exchange.getPollingMarketDataService();
// Get the latest full order book data for LTC/USD
OrderBook orderBook = marketDataService.getOrderBook(CurrencyPair.LTC_USD);
System.out.println(orderBook.toString());
System.out.println("size: " + (orderBook.getAsks().size() + orderBook.getBids().size()));
// Get the latest partial order book (2000 entries) data for BTC/USD
orderBook = marketDataService.getOrderBook(CurrencyPair.BTC_USD, 2000);
System.out.println(orderBook.toString());
System.out.println("size: " + (orderBook.getAsks().size() + orderBook.getBids().size()));
// Get the latest partial size order book (3 entries) data for BTC/USD
orderBook = marketDataService.getOrderBook(CurrencyPair.BTC_USD, 3);
System.out.println(orderBook.toString());
System.out.println("size: " + (orderBook.getAsks().size() + orderBook.getBids().size()));
}