Class WebsocketClientImpl

java.lang.Object
com.binance.connector.client.impl.WebsocketClientImpl
All Implemented Interfaces:
WebsocketClient

public class WebsocketClientImpl extends Object implements WebsocketClient

Websocket Streams

All stream endpoints under the Websocket Market Streams and User Data Streams section of the API documentation will be implemented in this class.
Response will be returned as callback.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    aggTradeStream​(String symbol, com.binance.connector.client.utils.WebSocketCallback callback)
    The Aggregate Trade Streams push trade information that is aggregated for a single taker order.
    int
    allBookTickerStream​(com.binance.connector.client.utils.WebSocketCallback callback)
    Pushes any update to the best bid or ask's price or quantity in real-time for all symbols.
    int
    allMiniTickerStream​(com.binance.connector.client.utils.WebSocketCallback callback)
    24hr rolling window mini-ticker statistics for all symbols that changed in an array.
    int
    allTickerStream​(com.binance.connector.client.utils.WebSocketCallback callback)
    24hr rolling window ticker statistics for all symbols that changed in an array.
    int
    bookTicker​(String symbol, com.binance.connector.client.utils.WebSocketCallback callback)
    Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.
    void
    Closes all streams
    void
    closeConnection​(int connectionId)
    Closes a specific stream based on stream Id.
    int
    combineStreams​(ArrayList<String> streams, com.binance.connector.client.utils.WebSocketCallback callback)
    Combined streams are accessed at /stream?streams=<streamName1>/<streamName2>/<streamName3>
    int
    diffDepthStream​(String symbol, int speed, com.binance.connector.client.utils.WebSocketCallback callback)
    Order book price and quantity depth updates used to locally manage an order book.
    int
    klineStream​(String symbol, String interval, com.binance.connector.client.utils.WebSocketCallback callback)
    The Kline/Candlestick Stream push updates to the current klines/candlestick every second.
    int
    listenUserStream​(String listenKey, com.binance.connector.client.utils.WebSocketCallback callback)
    User Data Streams are accessed at /ws/<listenKey>
    int
    miniTickerStream​(String symbol, com.binance.connector.client.utils.WebSocketCallback callback)
    24hr rolling window mini-ticker statistics.
    int
    partialDepthStream​(String symbol, int levels, int speed, com.binance.connector.client.utils.WebSocketCallback callback)
    Top bids and asks, Valid are 5, 10, or 20.
    int
    symbolTicker​(String symbol, com.binance.connector.client.utils.WebSocketCallback callback)
    24hr rolling window ticker statistics for a single symbol.
    int
    tradeStream​(String symbol, com.binance.connector.client.utils.WebSocketCallback callback)
    The Trade Streams push raw trade information; each trade has a unique buyer and seller.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait