public static void main(String[] args) throws IOException {
// Use the factory to get Bitstamp exchange API using default settings
Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BitstampExchange.class.getName());
BitstampStreamingConfiguration streamCfg = new BitstampStreamingConfiguration();
// Interested in the public streaming market data feed (no authentication)
StreamingExchangeService streamService = bitstamp.getStreamingExchangeService(streamCfg);
streamService.connect();
generic(streamService);
streamService.disconnect();