Request parameters.
Disconnects from the WebSocket server. If there is no active connection, a warning is logged. Otherwise, all connections in the connection pool are closed gracefully, and a message is logged indicating that the connection has been disconnected.
A Promise that resolves when all connections have been closed.
Checks if the WebSocket connection is currently open.
true if the connection is open, false otherwise.
Checks if the WebSocket connection is subscribed to the specified stream.
The name of the WebSocket stream to check.
true if the connection is subscribed to the stream, false otherwise.
Per-symbol candlestick updates. One stream per (symbol, interval) combination. Supported intervals: 5m, 1h, 1d, 1w, 1M. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
Request parameters.
Removes an event listener for the specified WebSocket event.
The WebSocket event to stop listening for, such as 'open', 'message', 'error', 'close', 'ping', or 'pong'.
The callback function that was previously added as the event listener.
Adds an event listener for the specified WebSocket event.
The WebSocket event to listen for, such as 'open', 'message', 'error', 'close', 'ping', or 'pong'.
The callback function to be executed when the event is triggered. The function can accept any number of arguments.
Real-time push of the authenticated user's order state transitions — both open-state updates (ORDER_UPDATE) and terminal-state notifications (ORDER_TERMINAL). Prerequisite: obtain a listenKey via the Listen Key endpoint first.
Request parameters.
Push-all price snapshot, polled every 3 seconds. One message carries the latest price for every active US-equity symbol. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
Request parameters.
Per-symbol real-time best-bid / best-ask. Each symbol has its own stream. Per-symbol throttle: at most one push per symbol every 200 ms. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
Request parameters.
Subscribes to one or multiple WebSocket streams Handles both single and pool modes
Single stream name or array of stream names to subscribe to
Optionalid: stringOptional subscription ID
void
Per-symbol push whenever the tradable direction of a symbol changes. Pushed only when the value actually changes (new value ≠ old value). Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
Request parameters.
Per-symbol trading-status transitions (halts, resumes, SSR, LULD pauses, etc.). Events that do not match a known status/reason rule are not pushed. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
Request parameters.
Unsubscribes from one or multiple WebSocket streams Handles both single and pool modes
Single stream name or array of stream names to unsubscribe from
Optionalid: stringOptional unsubscription ID
void
Single-stream broadcast of market-phase transitions. One message per transition; no periodic heartbeat payload. Server polls every 5 seconds. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.