Live subscription for stream

Hi there,

I use the following code to get live subscription to tickers using the API.

ProductSubscription subscription = ProductSubscription.create().addTicker(CurrencyPair.ETH_BTC).build();
exchangeStream.connect(subscription).blockingAwait();
exchangeStream.enableLiveSubscription();
Disposable tickers = exchangeStream.getStreamingMarketDataService().getTicker(CurrencyPair.ETH_BTC).subscribe(ticker -> System.out.println(ticker));

However, I see the updates coming exactly once every second, but I need live updates.

Is there a possibility to get the updates of the tickers instantly, and not in intervals of one second?

Thank you for your help.

Hi @Owen_McMushroom, which ticket’s stream name do you refer to?

In our Spot API documentation -> Market Websocket streams section , you can find “Update Speed” for each stream, if only 1000ms is mentioned then the lowest interval is already 1s.

I honestly don’t know, I use the org.knowm.xchange repository, that implements the class StreamingExchange and I didn’t deal with ticket’s stream names.

The thing is that a few months ago, I am pretty sure that I managed to have real time updates on the tickers, but I dont’t exactly remember how I did that.

Is there a way to get real time updates for tickers?

Hi @Owen_McMushroom, there’s several ticker streams and if you can discover which one you’re using from org.knowm.xchange, then you can find the update speed in the API documentation.
As you can expect, we can’t change the update speed besides what’s already mentioned there.

Thank you, I figured out, that by default org.knowm.xchange subscribes to the tickers, but one has to use bookTickers instead.