}
private static void generic(Exchange openExchangeRates) throws IOException {
// Interested in the polling market data feed
PollingMarketDataService marketDataService = openExchangeRates.getPollingMarketDataService();
// Get the latest ticker data showing EUR/USD
Ticker ticker = marketDataService.getTicker(CurrencyPair.EUR_USD);
System.out.println("Last: " + ticker.getLast().toString());
// Alternate way to print out ticker currency and amount
System.out.println("ticker: " + ticker.toString());
// Request another ticker. it will return a cached object
ticker = marketDataService.getTicker(CurrencyPair.JPY_USD);
System.out.println("cached Last: " + ticker.getLast().toString());
// Request BTC ticker. it will return a cached object
ticker = marketDataService.getTicker(CurrencyPair.BTC_USD);
System.out.println("cached Last: " + ticker.getLast().toString());
}