Interface: WSClientConfigurableOptions
Extended by
Properties
| Property | Type | Description |
|---|---|---|
api_key? | string | Your API key |
api_secret? | string | Your API secret |
beautify? | boolean | - |
beautifyWarnIfMissing? | boolean | If true, log a warning if the beautifier is missing anything for an event |
customParseJSONFn? | (raw: string) => object | Optional custom JSON parser used for incoming WS messages. Defaults to JSON.parse. |
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. |
demoTrading? | boolean | Set to true to use Binance's demo trading WebSocket endpoints. Demo trading uses real market data but simulated trading. More info: https://demo.binance.com/ Notes: - If demo trading, testnet should be set to false! - If testing a strategy, use demo trading instead. Testnet market data is very different from real market conditions. |
disableHeartbeat? | boolean | - |
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 |
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 | - |
testnet? | boolean | Set to true to connect to Binance's testnet environment. Notes: - Not all WebSocket categories support testnet. - If testing a strategy, this is not recommended. Testnet market data is very different from real market conditions. More guidance here: https://github.com/tiagosiebler/awesome-crypto-examples/wiki/CEX-Testnets |
useMMSubdomain? | boolean | Default: false. If true, use market maker endpoints when available. Eligible for high-frequency trading users who have enrolled and qualified in at least one of the Futures Liquidity Provider Programs. More info: https://www.binance.com/en/support/faq/detail/7df7f3838c3b49e692d175374c3a3283 |
wsOptions? | { protocols?: string[] | undefined; agent?: any; } & (Omit<Partial<ClientOptions>, "agent"> | Omit<Partial<ClientRequestArgs>, "agent">) | - |
wsUrl? | string | - |