Interface StreamingExchange

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

public interface StreamingExchange
extends Exchange
  • Field Details

  • Method Details

    • connect

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

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

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

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

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

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

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

      default io.reactivex.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.
      Observable with the message delay measure.
    • resubscribeChannels

      default void resubscribeChannels()
    • connectionIdle

      default io.reactivex.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.
      compressedMessages - Defaults to false
    • applyStreamingSpecification

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