exSpec.setPlainTextUriStreaming("ws://api.coinfloor.co.uk");
exSpec.setSslUriStreaming("wss://api.coinfloor.co.uk");
exSpec.setHost("coinfloor.co.uk");
exSpec.setPort(80);
Exchange coinfloorExchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
// Streaming exchange service can be instantiated in one of two ways:
// //Using default vars (commented out to prevent conflicts for this demo)
// StreamingExchangeService streamingExchangeServiceDefault = ((CoinfloorExchange)coinfloorExchange).getStreamingExchangeService();
// //Or with new vars:
ExchangeStreamingConfiguration exchangeStreamingConfiguration = new CoinfloorStreamingConfiguration(10, 10000, 30000, false, true, true);
StreamingExchangeService streamingExchangeService = coinfloorExchange.getStreamingExchangeService(exchangeStreamingConfiguration);
// connect, and authenicate using username/cookie/password provided in exSpec
streamingExchangeService.connect();
// start handler for events