knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.

Home Page:http://knowm.org/open-source/xchange/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

org.knowm.xchange.exceptions.NotYetImplementedForExchangeException: getTrades of OkexStreamingExchange

MasonINTS opened this issue · comments

I got error when using getTrades function of OkexStreamingExchange. Please help me
StreamingExchange exchange = StreamingExchangeFactory.INSTANCE.createExchange(OkexStreamingExchange.class); exchange.connect().blockingAwait(); StreamingMarketDataService service = exchange .getStreamingMarketDataService(); Disposable subscriptionTrade = service .getTrades(currencyPair) .subscribe(trade -> log.info("Trade: {}", trade), throwable -> log.error("Error in trade subscription", throwable));

Hi, MasonINTS
getTrades(CurrencyPair.class) - deprecated.
Instead use Instrument.class:
Instrument currencyPair = new CurrencyPair("BTC/USDT");

Thank you so much @rizer1980,
My issue was solved.