Interface: WSClientConfigurableOptions
General configuration for the WebsocketClient
Extended by
Properties
| Property | Type | Description |
|---|---|---|
apiKey? | string | Your API key |
apiSecret? | string | Your 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? | number | How 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? | number | How long to wait for a pong (heartbeat reply) before assuming the connection is dead |
reauthWSAPIOnReconnect? | boolean | If you authenticated the WS API before, automatically try to re-authenticate the WS API if you're disconnected/reconnected for any reason. |
reconnectTimeout? | number | Delay in milliseconds before respawning the connection |
recvWindow? | number | Compatibility option. It does not alter signature timestamps or exchange validity windows. |
requestOptions? | AxiosRequestConfig<any, any> | - |
restOptions? | RestClientOptions | - |
useNativeHeartbeats? | boolean | HTX clients use protocol heartbeat messages. The client disables native WebSocket ping/pong frames regardless of this option. |
wsEnvironment? | HtxWSNetwork | Switch 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 | - |