}
private static void generic(Exchange okcoinExchange) throws IOException {
// Interested in the public polling market data feed (no authentication)
PollingMarketDataService marketDataService = okcoinExchange.getPollingMarketDataService();
// Get the latest trade data for BTC_CNY
Trades trades = marketDataService.getTrades(CurrencyPair.BTC_USD, Prompts.this_week);
System.out.println(trades);
System.out.println("Trades(0): " + trades.getTrades().get(0).toString());
System.out.println("Trades size: " + trades.getTrades().size());
// Get the latest trades data for BTC_CNY for the past couple of trades
trades = marketDataService.getTrades(CurrencyPair.BTC_CNY, trades.getlastID() - 10);
System.out.println(trades);
System.out.println("Trades size: " + trades.getTrades().size());
}