Class BinanceUserDataSpotStreamingService
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.binance.BinanceUserDataSpotStreamingService
-
Nested Class Summary
Nested classes/interfaces inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
NettyStreamingService.NettyWebSocketClientHandler, NettyStreamingService.Subscription -
Field Summary
Fields 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
ConstructorsConstructorDescriptionBinanceUserDataSpotStreamingService(String apiUrl, String apiKey, String privateKey, ExchangeSpecification exchangeSpecification) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completableconnect()io.reactivex.rxjava3.core.Completableprotected StringgetChannelNameFromMessage(com.fasterxml.jackson.databind.JsonNode message) getSubscribeMessage(String channelName, Object... args) getSubscriptionUniqueId(String channelName, Object... args) getUnsubscribeMessage(String channelName, Object... args) protected voidhandleMessage(com.fasterxml.jackson.databind.JsonNode message) voidlogin()voidmessageHandler(String message) Handler that receives incoming messages.signPayload(String payload) io.reactivex.rxjava3.core.Observable<com.fasterxml.jackson.databind.JsonNode> Methods inherited from class info.bitrich.xchangestream.service.netty.JsonNettyStreamingService
processArrayMessageSeparately, sendObjectMessageMethods inherited from class info.bitrich.xchangestream.service.netty.NettyStreamingService
getChannel, getCustomHeaders, getWebSocketClientExtensionHandler, getWebSocketClientHandler, handleChannelError, handleChannelMessage, handleError, handleIdle, isSocketOpen, openConnection, resubscribeChannels, sendMessage, setAcceptAllCertificates, setAutoReconnect, setEnableLoggingHandler, setLoggingHandlerLevel, setSocksProxyHost, setSocksProxyPort, subscribeChannel, subscribeConnectionState, subscribeConnectionSuccess, subscribeDisconnect, subscribeIdle, subscribeReconnectFailure, useCompressedMessagesMethods inherited from class info.bitrich.xchangestream.service.ConnectableService
setBeforeConnectionHandler
-
Constructor Details
-
BinanceUserDataSpotStreamingService
public BinanceUserDataSpotStreamingService(String apiUrl, String apiKey, String privateKey, ExchangeSpecification exchangeSpecification)
-
-
Method Details
-
connect
public io.reactivex.rxjava3.core.Completable connect()- Overrides:
connectin classConnectableService
-
login
public void login() -
getSubscriptionUniqueId
- Overrides:
getSubscriptionUniqueIdin classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getSubscribeMessage
- Specified by:
getSubscribeMessagein classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>- Throws:
IOException
-
signPayload
- Throws:
Exception
-
disconnect
public io.reactivex.rxjava3.core.Completable disconnect()- Overrides:
disconnectin classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
messageHandler
Description copied from class:NettyStreamingServiceHandler that receives incoming messages.- Overrides:
messageHandlerin classJsonNettyStreamingService- Parameters:
message- Content of the message from the server.
-
handleMessage
protected void handleMessage(com.fasterxml.jackson.databind.JsonNode message) - Overrides:
handleMessagein classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
subscribeChannel
public io.reactivex.rxjava3.core.Observable<com.fasterxml.jackson.databind.JsonNode> subscribeChannel(BaseBinanceWebSocketTransaction.BinanceWebSocketTypes eventType) -
getChannelNameFromMessage
- Specified by:
getChannelNameFromMessagein classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-
getUnsubscribeMessage
- Specified by:
getUnsubscribeMessagein classNettyStreamingService<com.fasterxml.jackson.databind.JsonNode>
-