Package info.bitrich.xchangestream.okex
Class OkexStreamingExchange
java.lang.Object
org.knowm.xchange.BaseExchange
org.knowm.xchange.okex.OkexExchange
info.bitrich.xchangestream.okex.OkexStreamingExchange
- All Implemented Interfaces:
StreamingExchange
,Exchange
-
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 class org.knowm.xchange.okex.OkexExchange
accountLevel, PARAM_AWS_HOST, PARAM_AWS_SSL_URI, PARAM_PASSPHRASE, PARAM_SIMULATED, PARAM_USE_AWS
Fields inherited from class org.knowm.xchange.BaseExchange
accountService, exchangeMetaData, exchangeSpecification, logger, marketDataService, tradeService
Fields inherited from interface org.knowm.xchange.Exchange
USE_SANDBOX
Fields inherited from interface info.bitrich.xchangestream.core.StreamingExchange
ACCEPT_ALL_CERITICATES, AUTO_RECONNECT, ENABLE_LOGGING_HANDLER, L3_ORDERBOOK, SOCKS_PROXY_HOST, SOCKS_PROXY_PORT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
connect
(ProductSubscription... args) Connects to the WebSocket API of the exchange.io.reactivex.rxjava3.core.Completable
Disconnect from the WebSocket API.Returns service that can be used to access streaming market data.Returns service that can be used to access streaming trade data.boolean
isAlive()
Checks whether connection to the exchange is alive.void
setChannelInactiveHandler
(WebSocketClientHandler.WebSocketMessageHandler channelInactiveHandler) Enables the user to listen on channel inactive events and react appropriately.void
useCompressedMessages
(boolean compressedMessages) Set whether or not to enable compression handler.Methods inherited from class org.knowm.xchange.okex.OkexExchange
applySpecification, getDefaultExchangeSpecification, getNonceFactory, getResilienceRegistries, initServices, remoteInit, useSandbox
Methods inherited from class org.knowm.xchange.BaseExchange
getAccountService, getExchangeInstruments, getExchangeMetaData, getExchangeSpecification, getMarketDataService, getMetaDataFileName, getTradeService, loadExchangeMetaData, loadMetaData, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.knowm.xchange.Exchange
applySpecification, getAccountService, getDefaultExchangeSpecification, getExchangeInstruments, getExchangeMetaData, getExchangeSpecification, getMarketDataService, getNonceFactory, getResilienceRegistries, getTradeService, remoteInit
Methods inherited from interface info.bitrich.xchangestream.core.StreamingExchange
applyStreamingSpecification, connectionIdle, connectionStateObservable, connectionSuccess, disconnectObservable, getStreamingAccountService, messageDelay, reconnectFailure, resubscribeChannels
-
Field Details
-
WS_PUBLIC_CHANNEL_URI
- See Also:
-
WS_PRIVATE_CHANNEL_URI
- See Also:
-
AWS_WS_PUBLIC_CHANNEL_URI
- See Also:
-
AWS_WS_PRIVATE_CHANNEL_URI
- See Also:
-
SANDBOX_WS_PUBLIC_CHANNEL_URI
- See Also:
-
SANDBOX_WS_PRIVATE_CHANNEL_URI
- See Also:
-
-
Constructor Details
-
OkexStreamingExchange
public OkexStreamingExchange()
-
-
Method Details
-
connect
Description copied from interface:StreamingExchange
Connects to the WebSocket API of the exchange.- Specified by:
connect
in interfaceStreamingExchange
- 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
public io.reactivex.rxjava3.core.Completable disconnect()Description copied from interface:StreamingExchange
Disconnect from the WebSocket API.- Specified by:
disconnect
in interfaceStreamingExchange
- Returns:
Completable
that completes upon successful disconnect.
-
isAlive
public boolean isAlive()Description copied from interface:StreamingExchange
Checks whether connection to the exchange is alive.- Specified by:
isAlive
in interfaceStreamingExchange
- Returns:
- true if connection is open, otherwise false.
-
getStreamingMarketDataService
Description copied from interface:StreamingExchange
Returns service that can be used to access streaming market data.- Specified by:
getStreamingMarketDataService
in interfaceStreamingExchange
-
getStreamingTradeService
Description copied from interface:StreamingExchange
Returns service that can be used to access streaming trade data.- Specified by:
getStreamingTradeService
in interfaceStreamingExchange
-
useCompressedMessages
public void useCompressedMessages(boolean compressedMessages) Description copied from interface:StreamingExchange
Set whether or not to enable compression handler.- Specified by:
useCompressedMessages
in interfaceStreamingExchange
- Parameters:
compressedMessages
- Defaults to false
-
setChannelInactiveHandler
public void setChannelInactiveHandler(WebSocketClientHandler.WebSocketMessageHandler channelInactiveHandler) Enables the user to listen on channel inactive events and react appropriately.- Parameters:
channelInactiveHandler
- a WebSocketMessageHandler instance.
-