Interface StreamingExchange

All Superinterfaces:
Exchange
All Known Implementing Classes:
BinanceFutureStreamingExchange, BinanceStreamingExchange, BinanceUsStreamingExchange, BitfinexStreamingExchange, BitflyerStreamingExchange, BitmexStreamingExchange, BitstampStreamingExchange, BTCMarketsStreamingExchange, BybitStreamingExchange, CexioStreamingExchange, CoinbaseProStreamingExchange, CoincheckStreamingExchange, CoinjarStreamingExchange, CoinmateStreamingExchange, dydxStreamingExchange, FtxStreamingExchange, GateioStreamingExchange, GeminiStreamingExchange, HitbtcStreamingExchange, HuobiStreamingExchange, KrakenFuturesStreamingExchange, KrakenStreamingExchange, KucoinStreamingExchange, LgoStreamingExchange, OkCoinStreamingExchange, OkexStreamingExchange, PoloniexStreamingExchange, SerumStreamingExchange

public interface StreamingExchange extends Exchange
  • Field Details

  • Method Details

    • connect

      io.reactivex.rxjava3.core.Completable connect(ProductSubscription... args)
      Connects to the WebSocket API of the exchange.
      Parameters:
      args - Product subscription is used only in certain exchanges where you need to specify subscriptions during the connect phase.
      Returns:
      Completable that completes upon successful connection.
    • disconnect

      io.reactivex.rxjava3.core.Completable disconnect()
      Disconnect from the WebSocket API.
      Returns:
      Completable that completes upon successful disconnect.
    • isAlive

      boolean isAlive()
      Checks whether connection to the exchange is alive.
      Returns:
      true if connection is open, otherwise false.
    • reconnectFailure

      default io.reactivex.rxjava3.core.Observable<Throwable> reconnectFailure()
      Observable for reconnection failure event. When this happens, it usually indicates that the server or the network is down.
      Returns:
      Observable with the exception during reconnection.
    • connectionSuccess

      default io.reactivex.rxjava3.core.Observable<Object> connectionSuccess()
      Observable for connection success event. When this happens, it usually indicates that the server or the network is down.
      Returns:
      Observable
    • disconnectObservable

      default io.reactivex.rxjava3.core.Observable<Object> disconnectObservable()
      Observable for disconnection event.
      Returns:
      Observable
    • connectionStateObservable

      default io.reactivex.rxjava3.core.Observable<ConnectionStateModel.State> connectionStateObservable()
      Observable for connectionState. designed to replaces connectionSuccess reconnectFailure disconnectObservable
      Returns:
      Observable
    • messageDelay

      default io.reactivex.rxjava3.core.Observable<Long> messageDelay()
      Observable for message delay measure. Every time when the client received a message with a timestamp, the delay time is calculated and pushed to subscribers.
      Returns:
      Observable with the message delay measure.
    • resubscribeChannels

      default void resubscribeChannels()
    • connectionIdle

      default io.reactivex.rxjava3.core.Observable<Object> connectionIdle()
    • getStreamingMarketDataService

      default StreamingMarketDataService getStreamingMarketDataService()
      Returns service that can be used to access streaming market data.
    • getStreamingAccountService

      default StreamingAccountService getStreamingAccountService()
      Returns service that can be used to access streaming account data.
    • getStreamingTradeService

      default StreamingTradeService getStreamingTradeService()
      Returns service that can be used to access streaming trade data.
    • useCompressedMessages

      void useCompressedMessages(boolean compressedMessages)
      Set whether or not to enable compression handler.
      Parameters:
      compressedMessages - Defaults to false
    • applyStreamingSpecification

      default void applyStreamingSpecification(ExchangeSpecification exchangeSpec, NettyStreamingService<?> streamingService)