Interface: WebsocketClientOptions
WS configuration that's always defined, regardless of user configuration (usually comes from defaults if there's no user-provided values)
Extends
Properties
| Property | Type | Description | Overrides | Inherited from |
|---|---|---|---|---|
apiKey? | string | Your API key | - | WSClientConfigurableOptions.apiKey |
apiSecret? | string | Your API secret | - | WSClientConfigurableOptions.apiSecret |
authPrivateConnectionsOnConnect | boolean | - | - | - |
authPrivateRequests | boolean | - | - | - |
customSignMessageFn? | (message: string, secret: string) => Promise<string> | Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method Look in the examples folder for a demonstration on using node's createHmac instead. | - | WSClientConfigurableOptions.customSignMessageFn |
pingInterval | number | How often to check if the connection is alive | WSClientConfigurableOptions.pingInterval | - |
pongTimeout | number | How long to wait for a pong (heartbeat reply) before assuming the connection is dead | WSClientConfigurableOptions.pongTimeout | - |
reauthWSAPIOnReconnect | boolean | If you authenticated the WS API before, automatically try to re-authenticate the WS API if you're disconnected/reconnected for any reason. | WSClientConfigurableOptions.reauthWSAPIOnReconnect | - |
reconnectTimeout | number | Delay in milliseconds before respawning the connection | WSClientConfigurableOptions.reconnectTimeout | - |
recvWindow | number | Define a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds | WSClientConfigurableOptions.recvWindow | - |
requestOptions? | object | - | - | WSClientConfigurableOptions.requestOptions |
useTestnet? | boolean | Use the Gate TestNet WebSocket hosts. | - | WSClientConfigurableOptions.useTestnet |
wsOptions? | { protocols?: string[] | undefined; agent?: any; } & (Omit<Partial<ClientOptions>, "agent"> | Omit<Partial<ClientRequestArgs>, "agent">) | - | - | WSClientConfigurableOptions.wsOptions |
wsUrl? | string | - | - | WSClientConfigurableOptions.wsUrl |