Interface: WSClientConfigurableOptions
General configuration for the WebsocketClient
Extended by
Properties
| Property | Type | Description |
|---|---|---|
apiKey? | string | Your API key |
apiPassphrase? | string | Your API passphrase (can be anything) that you included when creating this API key |
apiRegion? | APIRegion | The API region you would like to work with: - Global (default) - API Docs: https://www.kucoin.com/docs-new/introduction - EU: - API Docs: https://www.kucoin.com/en-eu/docs-new/introduction/eu - Behaves the same as global, but keep in mind that futures may not be available at this time for EU users. - AU: - API Docs: https://www.kucoin.com/en-au/docs-new/introduction/au - Ensures regional market data is retrieved (e.g. correct trading pairs, correct tickers, etc). - Also ensures requests for AU users include the required extra header (X-SITE-TYPE: australia). |
apiSecret? | string | Your 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. |
dataMessageFilter? | WsDataMessageFilter | Optional filter applied to data pushes ("type":"message") before they are parsed, e.g. to drop symbols you do not track on an all-market topic such as /market/ticker:all. Parsing is the dominant per-message cost on busy topics. Control frames (welcome, ack, error, pong) never reach the filter, and if it throws the frame is processed as usual. - Return false to drop the message before any JSON parsing. - Return true to allow it through. |
pingInterval? | number | How often to check if the connection is alive |
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 | Define a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds |
requestOptions? | AxiosRequestConfig<any, any> | - |
restOptions? | RestClientOptions | - |
wsOptions? | { protocols?: string[] | undefined; agent?: any; } & (Omit<Partial<ClientOptions>, "agent"> | Omit<Partial<ClientRequestArgs>, "agent">) | - |
wsUrl? | string | - |