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.