Skip to content

Interface: WebsocketClientOptions ​

General configuration for the WebsocketClient

Extends ​

Properties ​

PropertyTypeDescriptionOverridesInherited from
apiKey?stringYour API key-WSClientConfigurableOptions.apiKey
apiPass?stringThe passphrase you set when creating the API Key (NOT your account password)-WSClientConfigurableOptions.apiPass
apiSecret?stringYour API secret-WSClientConfigurableOptions.apiSecret
authPrivateConnectionsOnConnectboolean---
authPrivateRequestsboolean---
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?booleanSet 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
pingIntervalnumberHow often to check if the connection is aliveWSClientConfigurableOptions.pingInterval-
pongTimeoutnumberHow long to wait for a pong (heartbeat reply) before assuming the connection is deadWSClientConfigurableOptions.pongTimeout-
reconnectTimeoutnumberDelay in milliseconds before respawning the connectionWSClientConfigurableOptions.reconnectTimeout-
recvWindownumberDefine a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 secondsWSClientConfigurableOptions.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

Built by Siebly. Open source SDKs for exchange APIs.