Binance Web3 Connector JS
    Preparing search index...

    Class ConfigurationWebsocketStreams

    Represents the configuration options for the WebSocket Streams.

    • If wsToken is provided, it will be used directly for WebSocket connections.
    • If apiKey is provided, a token will be fetched from the REST API and renewed automatically.
    • If neither wsToken nor apiKey is provided, an error will be thrown when attempting to connect.

    Hierarchy

    • ConfigurationWebsocketStreams
      • ConfigurationWebsocketStreams
    Index
    • Parameters

      • param: ConfigurationWebsocketStreams & {
            apiKey?: string;
            apiSecret?: string;
            basePath?: string;
            privateKey?: string | Buffer<ArrayBufferLike>;
            privateKeyPassphrase?: string;
            wsToken?: string;
            wsTokenEndpoint?: string;
        }

      Returns ConfigurationWebsocketStreams

    agent?: boolean | Agent

    websocket agent

    false
    

    ConfigurationWebsocketStreams

    apiKey?: string

    The API key used for authentication (optional).

    apiSecret?: string

    The API secret used for authentication (optional).

    basePath?: string

    The base URL of the REST API (optional).

    compression?: boolean

    use compression for websocket messages

    true
    

    ConfigurationWebsocketAPI

    mode?: "single" | "pool"

    the mode of the connection, either 'single' or 'pool'.

    single
    

    ConfigurationWebsocketStreams

    poolSize?: number

    the size of the connection pool, if the mode is set to 'pool'.

    1
    

    ConfigurationWebsocketStreams

    privateKey?: string | Buffer<ArrayBufferLike>

    The private key used for authentication (optional).

    privateKeyPassphrase?: string

    The passphrase for the private key (optional).

    reconnectDelay?: number

    reconnction delay

    5000
    

    ConfigurationWebsocketStreams

    timeUnit?: TimeUnit

    timeUnit (used only on SPOT API)

    ConfigurationWebsocketStreams

    wsToken?: string

    The WebSocket token provided by the user (optional).

    wsTokenEndpoint?: string

    The endpoint to fetch the WebSocket token (optional).

    wsURL?: string

    override websocket url

    ConfigurationWebsocketStreams