Skip to content

Interface: WebsocketClientOptions ​

Resolved WebSocket configuration, combining optional user settings with required internal defaults.

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>Provide a custom signing callback for WebSocket authentication. The SDK passes the signing payload and API secret and uses the returned signature.-WSClientConfigurableOptions.customSignMessageFn
pingIntervalnumberHow often to check if the connection is alive. Futures public WS closes a connection that has had no ping for 25s, without notice. Keep this under 25s. The SDK default is 10s.WSClientConfigurableOptions.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-
recvWindownumberCompatibility option. It does not alter signature timestamps or exchange validity windows.WSClientConfigurableOptions.recvWindow-
requestOptions?AxiosRequestConfig<any, any>--WSClientConfigurableOptions.requestOptions
requireConnectionReadyConfirmationbooleanIf true, require a "receipt" that the connection is ready for use (e.g. a specific event type)--
restOptions?RestClientOptions--WSClientConfigurableOptions.restOptions
useNativeHeartbeatsbooleanHTX clients use protocol heartbeat messages. The client disables native WebSocket ping/pong frames regardless of this option.WSClientConfigurableOptions.useNativeHeartbeats-
wsEnvironment?HtxWSNetworkSwitch between the AWS and Standard WebSocket domains. The AWS domain has better connectivity from certain regions. If you have trouble maintaining a stable connection, try switching the domain. AWS is used by default. If this field isn't set, but you're setting the baseUrlKey in the embedded restOptions, the WS domain will automatically switch to match the REST domain.-WSClientConfigurableOptions.wsEnvironment
wsOptions?WSConnectionOptions--WSClientConfigurableOptions.wsOptions
wsUrl?string--WSClientConfigurableOptions.wsUrl

Built by Siebly. Open source SDKs for exchange APIs.