Skip to content

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 ​

PropertyTypeDescriptionOverridesInherited from
apiKey?stringYour API key-WSClientConfigurableOptions.apiKey
apiSecret?stringYour API secret-WSClientConfigurableOptions.apiSecret
authPrivateConnectionsOnConnectboolean---
authPrivateRequestsboolean---
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
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-
reauthWSAPIOnReconnectbooleanIf you authenticated the WS API before, automatically try to re-authenticate the WS API if you're disconnected/reconnected for any reason.WSClientConfigurableOptions.reauthWSAPIOnReconnect-
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?object--WSClientConfigurableOptions.requestOptions
useTestnet?booleanUse 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

Built by Siebly. Open source SDKs for exchange APIs.