Package info.bitrich.xchangestream.core
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface org.knowm.xchange.Exchange
USE_SANDBOX
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
applyStreamingSpecification
(ExchangeSpecification exchangeSpec, NettyStreamingService<?> streamingService) io.reactivex.rxjava3.core.Completable
connect
(ProductSubscription... args) Connects to the WebSocket API of the exchange.default io.reactivex.rxjava3.core.Observable<Object>
default io.reactivex.rxjava3.core.Observable<ConnectionStateModel.State>
Observable for connectionState.default io.reactivex.rxjava3.core.Observable<Object>
Observable for connection success event.io.reactivex.rxjava3.core.Completable
Disconnect from the WebSocket API.default io.reactivex.rxjava3.core.Observable<Object>
Observable for disconnection event.default StreamingAccountService
Returns service that can be used to access streaming account data.default StreamingMarketDataService
Returns service that can be used to access streaming market data.default StreamingTradeService
Returns service that can be used to access streaming trade data.boolean
isAlive()
Checks whether connection to the exchange is alive.default io.reactivex.rxjava3.core.Observable<Long>
Observable for message delay measure.default io.reactivex.rxjava3.core.Observable<Throwable>
Observable for reconnection failure event.default void
void
useCompressedMessages
(boolean compressedMessages) Set whether or not to enable compression handler.Methods inherited from interface org.knowm.xchange.Exchange
applySpecification, getAccountService, getDefaultExchangeSpecification, getExchangeInstruments, getExchangeMetaData, getExchangeSpecification, getMarketDataService, getNonceFactory, getResilienceRegistries, getTradeService, remoteInit
-
Field Details
-
ACCEPT_ALL_CERITICATES
- See Also:
-
ENABLE_LOGGING_HANDLER
- See Also:
-
SOCKS_PROXY_HOST
- See Also:
-
SOCKS_PROXY_PORT
- See Also:
-
AUTO_RECONNECT
- See Also:
-
L3_ORDERBOOK
- See Also:
-
-
Method Details
-
connect
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
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
Observable for connection success event. When this happens, it usually indicates that the server or the network is down.- Returns:
- Observable
-
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
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
-
getStreamingMarketDataService
Returns service that can be used to access streaming market data. -
getStreamingAccountService
Returns service that can be used to access streaming account data. -
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)
-