Class KucoinStreamingMarketDataService
java.lang.Object
info.bitrich.xchangestream.kucoin.KucoinStreamingMarketDataService
- All Implemented Interfaces:
StreamingMarketDataService
-
Constructor Summary
ConstructorsConstructorDescriptionKucoinStreamingMarketDataService(info.bitrich.xchangestream.kucoin.KucoinStreamingService service, KucoinMarketDataService marketDataService, Runnable onApiCall) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Observable<OrderBook>getOrderBook(CurrencyPair currencyPair, Object... args) Get an order book representing the current offered exchange rates (market depth).io.reactivex.rxjava3.core.Observable<Ticker>getTicker(CurrencyPair currencyPair, Object... args) Get a ticker representing the current exchange rate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface info.bitrich.xchangestream.core.StreamingMarketDataService
getFundingRate, getFundingRates, getOrderBook, getOrderBookUpdates, getTicker, getTrades, getTrades
-
Constructor Details
-
KucoinStreamingMarketDataService
public KucoinStreamingMarketDataService(info.bitrich.xchangestream.kucoin.KucoinStreamingService service, KucoinMarketDataService marketDataService, Runnable onApiCall)
-
-
Method Details
-
getTicker
public io.reactivex.rxjava3.core.Observable<Ticker> getTicker(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataServiceGet a ticker representing the current exchange rate. EmitsNotConnectedExceptionWhen not connected to the WebSocket API.Warning: There are currently no guarantees that messages will not be skipped, or that any initial state message will be sent on connection.
- Specified by:
getTickerin interfaceStreamingMarketDataService- Parameters:
currencyPair- Currency pair of the ticker- Returns:
Observablethat emitsTickerwhen exchange sends the update.
-
getOrderBook
public io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBook(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataServiceGet an order book representing the current offered exchange rates (market depth).Warning: The library will attempt to keep the snapshots returned in sync with the exchange using the approaches published by that exchange. However, there are currently no guarantees that messages will not be skipped, or that any initial state message will be sent on connection. Emits
NotConnectedExceptionwhen not connected to the WebSocket API.- Specified by:
getOrderBookin interfaceStreamingMarketDataService- Parameters:
currencyPair- Currency pair of the order book- Returns:
Observablethat emitsOrderBookwhen exchange sends the update.
-