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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
objectMapperFields inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
channels, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_IDLE_TIMEOUT, DEFAULT_RETRY_DURATION, uriFields inherited from class info.bitrich.xchangestream.service.ConnectableService
BEFORE_CONNECTION_HANDLER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetChannelNameFromMessage(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) voidsubscribeMultipleCurrencyPairs(ProductSubscription... products) Methods inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
messageHandler, processArrayMessageSeparately, sendObjectMessageMethods 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, useCompressedMessagesMethods 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:
getChannelNameFromMessagein 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:
subscribeChannelin classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getSubscribeMessage
- Specified by:
getSubscribeMessagein classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>- Throws:
IOException
-
getUnsubscribeMessage
- Specified by:
getUnsubscribeMessagein classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>- Throws:
IOException
-