public class BitcoinChartsTickerDemo {
public static void main(String[] args) throws IOException {
// Use the factory to get BitcoinCharts exchange API using default settings
Exchange bitcoinChartsExchange = ExchangeFactory.INSTANCE.createExchange(BitcoinChartsExchange.class.getName());
// Interested in the public polling market data feed (no authentication)
PollingMarketDataService marketDataService = bitcoinChartsExchange.getPollingMarketDataService();
// Get the latest ticker data showing BTC/bitstampUSD
CurrencyPair currencyPair = new CurrencyPair(Currencies.BTC, "bitstampUSD");
Ticker ticker = marketDataService.getTicker(currencyPair);