}
private static void generic(Exchange krakenExchange) throws IOException {
// Interested in the public polling market data feed (no authentication)
PollingMarketDataService marketDataService = krakenExchange.getPollingMarketDataService();
// Get the latest trade data for BTC_USD
Trades trades = marketDataService.getTrades(CurrencyPair.BTC_USD);
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 trade data for BTC_USD for the past 12 hours (note: doesn't account for time zone differences, should use UTC instead)
trades = marketDataService.getTrades(CurrencyPair.BTC_USD, (long) (System.nanoTime() - (12 * 60 * 60 * Math.pow(10, 9))));
System.out.println(trades);
System.out.println("Trades size: " + trades.getTrades().size());
}