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.
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.
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.
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: stringOptional subscription ID
void
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: stringOptional unsubscription ID
void
Receive push notifications hen Binance publishes announcements in English (language code: en).