Request parameters.
Disconnects from the WebSocket server. If there is no active connection, a warning is logged. Otherwise, all connections in the connection pool are closed gracefully, and a message is logged indicating that the connection has been disconnected.
A Promise that resolves when all connections have been closed.
Underlying(e.g ETHUSDT) index stream.
Update Speed: 1000ms
Request parameters.
Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.
Update Speed: Real-Time
Request parameters.
Checks if the WebSocket connection is currently open.
true if the connection is open, false otherwise.
Checks if the WebSocket connection is subscribed to the specified stream.
The name of the WebSocket stream to check.
true if the connection is subscribed to the stream, false otherwise.
The Kline/Candlestick Stream push updates to the current klines/candlestick every 1000 milliseconds (if existing).
Update Speed: 1000ms
Request parameters.
The mark price for all option symbols on specific underlying asset. E.g.btcusdt@optionMarkPrice
Update Speed: 1000ms
Request parameters.
New symbol listing stream.
Update Speed: 50ms
Request parameters.
Removes an event listener for the specified WebSocket event.
The WebSocket event to stop listening for, such as 'open', 'message', 'error', 'close', 'ping', or 'pong'.
The callback function that was previously added as the event listener.
Adds an event listener for the specified WebSocket event.
The WebSocket event to listen for, such as 'open', 'message', 'error', 'close', 'ping', or 'pong'.
The callback function to be executed when the event is triggered. The function can accept any number of arguments.
Option open interest for specific underlying asset on specific expiration date. E.g.ethusdt@openInterest@221125
Update Speed: 60s
Request parameters.
Top <levels> bids and asks, Valid levels are <levels> are 5, 10, 20.
Update Speed: 100ms or 500ms
Request parameters.
Subscribes to one or multiple WebSocket streams Handles both single and pool modes
Single stream name or array of stream names to subscribe to
Optionalid: numberOptional subscription ID
void
24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent.
Update Speed: 1000ms
Request parameters.
The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.btcusdt@optionTrade
Update Speed: 50ms
Request parameters.
Unsubscribes from one or multiple WebSocket streams Handles both single and pool modes
Single stream name or array of stream names to unsubscribe from
Optionalid: numberOptional unsubscription ID
void
Subscribes to the user data WebSocket stream using the provided listen key.
The listen key for the user data WebSocket stream.
Optionalid: stringOptional user data stream ID
A WebSocket stream handler for the user data stream.
Bids and asks, pushed every 500 milliseconds, 100 milliseconds (if existing)
Update Speed: 100ms or 500ms