Binance Connector JS
    Preparing search index...
    Index

    Constructors

    Methods

    • 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.

      Returns Promise<void>

      A Promise that resolves when all connections have been closed.

      Error if the WebSocket client is not set.

    • Removes an event listener for the specified WebSocket event.

      Parameters

      • event: "open" | "message" | "error" | "close" | "ping" | "pong"

        The WebSocket event to stop listening for, such as 'open', 'message', 'error', 'close', 'ping', or 'pong'.

      • listener: (...args: any[]) => void

        The callback function that was previously added as the event listener.

      Returns void

    • Adds an event listener for the specified WebSocket event.

      Parameters

      • event: "open" | "message" | "error" | "close" | "ping" | "pong"

        The WebSocket event to listen for, such as 'open', 'message', 'error', 'close', 'ping', or 'pong'.

      • listener: (...args: any[]) => void

        The callback function to be executed when the event is triggered. The function can accept any number of arguments.

      Returns void