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>Provide a custom signing callback for WebSocket authentication. The SDK passes the signing payload and API secret and uses the returned signature.
pingInterval?numberHow 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.
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?numberCompatibility option. It does not alter signature timestamps or exchange validity windows.
requestOptions?AxiosRequestConfig<any, any>-
restOptions?RestClientOptions-
useNativeHeartbeats?booleanHTX clients use protocol heartbeat messages. The client disables native WebSocket ping/pong frames regardless of this option.
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.
wsOptions?WSConnectionOptions-
wsUrl?string-

Built by Siebly. Open source SDKs for exchange APIs.