Skip to content

Interface: WSClientConfigurableOptions ​

General configuration for the WebsocketClient

Extended by ​

Properties ​

PropertyTypeDescription
apiKey?stringYour API key
apiSecret?stringYour API secret
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.
pingInterval?numberHow often to check if the connection is alive
pongTimeout?numberHow long to wait for a pong (heartbeat reply) before assuming the connection is dead
reauthWSAPIOnReconnect?booleanIf you authenticated the WS API before, automatically try to re-authenticate the WS API if you're disconnected/reconnected for any reason.
reconnectTimeout?numberDelay in milliseconds before respawning the connection
recvWindow?numberOffset added to the local timestamp when signing WebSocket requests, in milliseconds. Defaults to -1000. This does not configure a server-side acceptance window.
requestOptions?object-
useTestnet?booleanUse the Gate TestNet WebSocket hosts.
wsOptions?{ protocols?: string[] | undefined; agent?: any; } & (Omit<Partial<ClientOptions>, "agent"> | Omit<Partial<ClientRequestArgs>, "agent">)-
wsUrl?string-

Built by Siebly. Open source SDKs for exchange APIs.