Interface: WebsocketClientOptions
General configuration for the WebsocketClient
Extends
Properties
| Property | Type | Description | Overrides | Inherited from |
|---|---|---|---|---|
apiKey? | string | Your API key | - | WSClientConfigurableOptions.apiKey |
apiPass? | string | The passphrase you set when creating the API Key (NOT your account password) | - | WSClientConfigurableOptions.apiPass |
apiSecret? | string | Your API secret | - | WSClientConfigurableOptions.apiSecret |
authPrivateConnectionsOnConnect | boolean | - | - | - |
authPrivateRequests | boolean | - | - | - |
customSignMessageFn? | (message: string, secret: string) => Promise<string> | Provide a custom signing function. The SDK passes the serialized signing payload and API secret to this function and uses its returned signature. | - | WSClientConfigurableOptions.customSignMessageFn |
demoTrading? | boolean | Set to true to use Bitget demo WebSocket endpoints. Use demo API credentials. See the Classic V2 and UTA V3 demo references. | - | WSClientConfigurableOptions.demoTrading |
disableHeartbeat? | boolean | - | - | WSClientConfigurableOptions.disableHeartbeat |
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 | - |
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? | RestClientOptions | - | - | WSClientConfigurableOptions.requestOptions |
wsOptions? | { protocols?: string[] | undefined; agent?: any; } & (Omit<Partial<ClientOptions>, "agent"> | Omit<Partial<ClientRequestArgs>, "agent">) | - | - | WSClientConfigurableOptions.wsOptions |
wsUrl? | string | - | - | WSClientConfigurableOptions.wsUrl |