Skip to content

Interface: WSClientConfigurableOptions ​

Extended by ​

Properties ​

PropertyTypeDescription
api_key?stringYour API key
api_secret?stringYour API secret
beautify?boolean-
beautifyWarnIfMissing?booleanIf true, log a warning if the beautifier is missing anything for an event
customParseJSONFn?(raw: string) => objectOptional 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?booleanSet 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?numberHow often to check if the connection is alive
pongTimeout?numberHow long to wait for a pong (heartbeat reply) before assuming the connection is dead
reconnectTimeout?numberDelay in milliseconds before respawning the connection
recvWindow?numberDefine a recv window when preparing a private websocket signature. This is in milliseconds, so 5000 == 5 seconds
requestOptions?AxiosRequestConfig<any, any>-
restOptions?RestClientOptions-
testnet?booleanSet 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?booleanDefault: 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-

Built by Siebly. Open source SDKs for exchange APIs.