public interface SubscriptionClient
static SubscriptionClient create()
static SubscriptionClient create(SubscriptionOptions subscriptionOptions)
subscriptionOptions - The option of subscription connection, see
SubscriptionOptionsvoid unsubscribeAll()
void subscribeAggregateTradeEvent(String symbol, SubscriptionListener<AggregateTradeEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeMarkPriceEvent(String symbol, SubscriptionListener<MarkPriceEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeCandlestickEvent(String symbol, CandlestickInterval interval, SubscriptionListener<CandlestickEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".interval - The candlestick interval, like "ONE_MINUTE".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeSymbolMiniTickerEvent(String symbol, SubscriptionListener<SymbolMiniTickerEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeAllMiniTickerEvent(SubscriptionListener<List<SymbolMiniTickerEvent>> callback, SubscriptionErrorHandler errorHandler)
callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeSymbolTickerEvent(String symbol, SubscriptionListener<SymbolTickerEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeAllTickerEvent(SubscriptionListener<List<SymbolTickerEvent>> callback, SubscriptionErrorHandler errorHandler)
callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeSymbolBookTickerEvent(String symbol, SubscriptionListener<SymbolBookTickerEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeAllBookTickerEvent(SubscriptionListener<SymbolBookTickerEvent> callback, SubscriptionErrorHandler errorHandler)
callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeSymbolLiquidationOrderEvent(String symbol, SubscriptionListener<LiquidationOrderEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeAllLiquidationOrderEvent(SubscriptionListener<LiquidationOrderEvent> callback, SubscriptionErrorHandler errorHandler)
callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeBookDepthEvent(String symbol, Integer limit, SubscriptionListener<OrderBookEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".limit - The limit.callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeDiffDepthEvent(String symbol, SubscriptionListener<OrderBookEvent> callback, SubscriptionErrorHandler errorHandler)
symbol - The symbol, like "btcusdt".callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.void subscribeUserDataEvent(String listenKey, SubscriptionListener<UserDataUpdateEvent> callback, SubscriptionErrorHandler errorHandler)
listenKey - The listenKey.callback - The implementation is required. onReceive will be called
if receive server's update.errorHandler - The error handler will be called if subscription failed
or error happen between client and Binance server.Copyright © 2021. All rights reserved.