Package info.bitrich.xchangestream.dydx
Class dydxStreamingService
java.lang.Object
info.bitrich.xchangestream.service.ConnectableService
info.bitrich.xchangestream.service.netty.NettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
info.bitrich.xchangestream.dydx.dydxStreamingService
Author: Max Gao (gaamox@tutanota.com) Created: 20-02-2021
-
Nested Class Summary
Nested classes/interfaces inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
NettyStreamingService.NettyWebSocketClientHandler, NettyStreamingService.Subscription
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
objectMapper
Fields inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
channels, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_IDLE_TIMEOUT, DEFAULT_RETRY_DURATION, uri
Fields inherited from class info.bitrich.xchangestream.service.ConnectableService
BEFORE_CONNECTION_HANDLER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getChannelNameFromMessage
(com.fasterxml.jackson.databind.JsonNode message) io.reactivex.rxjava3.core.Observable<dydxWebSocketTransaction>
getRawWebsocketTransactions
(CurrencyPair currencyPair, String baseChannelName) Creates an observable of a channel using the baseChannelName and currencyPair.getSubscribeMessage
(String channelName, Object... args) getUnsubscribeMessage
(String channelName, Object... args) io.reactivex.rxjava3.core.Observable<com.fasterxml.jackson.databind.JsonNode>
subscribeChannel
(String channelName, Object... args) void
subscribeMultipleCurrencyPairs
(ProductSubscription... products) Methods inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
messageHandler, processArrayMessageSeparately, sendObjectMessage
Methods inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
disconnect, getChannel, getCustomHeaders, getSubscriptionUniqueId, getWebSocketClientExtensionHandler, getWebSocketClientHandler, handleChannelError, handleChannelMessage, handleError, handleIdle, handleMessage, isSocketOpen, openConnection, resubscribeChannels, sendMessage, setAcceptAllCertificates, setAutoReconnect, setEnableLoggingHandler, setLoggingHandlerLevel, setSocksProxyHost, setSocksProxyPort, subscribeConnectionState, subscribeConnectionSuccess, subscribeDisconnect, subscribeIdle, subscribeReconnectFailure, useCompressedMessages
Methods inherited from class info.bitrich.xchangestream.service.ConnectableService
connect, setBeforeConnectionHandler
-
Field Details
-
SUBSCRIBED
- See Also:
-
CHANNEL_DATA
- See Also:
-
V3_ORDERBOOK
- See Also:
-
V3_TRADES
- See Also:
-
V3_ACCOUNTS
- See Also:
-
V3_MARKETS
- See Also:
-
V1_ORDERBOOK
- See Also:
-
V1_TRADES
- See Also:
-
V1_ACCOUNTS
- See Also:
-
V1_MARKETS
- See Also:
-
ORDERBOOK
- See Also:
-
-
Constructor Details
-
dydxStreamingService
-
-
Method Details
-
getChannelNameFromMessage
- Specified by:
getChannelNameFromMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getProduct
-
subscribeMultipleCurrencyPairs
-
getRawWebsocketTransactions
public io.reactivex.rxjava3.core.Observable<dydxWebSocketTransaction> getRawWebsocketTransactions(CurrencyPair currencyPair, String baseChannelName) Creates an observable of a channel using the baseChannelName and currencyPair. For example, subscribing to the trades channel for WETH/USDC will create a new channel "trades-WETH-USDC".- Parameters:
currencyPair
- any currency pair supported by dydxbaseChannelName
- e.g. "orderbook", "v3_orderbook", etc.- Returns:
-
subscribeChannel
public io.reactivex.rxjava3.core.Observable<com.fasterxml.jackson.databind.JsonNode> subscribeChannel(String channelName, Object... args) - Overrides:
subscribeChannel
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getSubscribeMessage
- Specified by:
getSubscribeMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
- Throws:
IOException
-
getUnsubscribeMessage
- Specified by:
getUnsubscribeMessage
in classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
- Throws:
IOException
-