Interface StreamingExchange

All Superinterfaces:
Exchange
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.
      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.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.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.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.Observable<Object> disconnectObservable()
      Observable for disconnection event.
      Returns:
      Observable
    • connectionStateObservable

      default io.reactivex.Observable<ConnectionStateModel.State> connectionStateObservable()
      Observable for connectionState. designed to replaces connectionSuccess reconnectFailure disconnectObservable
      Returns:
      Observable
    • 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.
      Returns:
      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.
      Parameters:
      compressedMessages - Defaults to false
    • applyStreamingSpecification

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