Websockets → Subscribe
AI-generatedSummary
Subscribes to AlphaInsider websocket channels and emits matching real-time events as n8n items. The trigger requires AlphaInsider API credentials and can reconnect automatically after disconnects.
Inputs
- Channels (required) — Comma-separated or newline-separated channel names. Whitespace is trimmed and duplicates are removed; at least one non-empty channel is required. Example: wsOrders:strategy_id or wsStockPrice:AAPL:NASDAQ.
- Reconnect — Whether to reconnect after the socket closes; defaults to true. When disabled, websocket errors are emitted as node errors.
- Reconnect Delay (Seconds) — Delay before reconnecting when enabled; defaults to 5 seconds and must be at least 1 second.
- AlphaInsider API credentials (required) — The node uses the credential's API key as the websocket subscription token.
Output shape
A stream of n8n items, one per accepted websocket event; each item's json contains the event message object.
The trigger connects to AlphaInsider's websocket endpoint, subscribes to the configured channels, and sends a ping every 30 seconds while connected. It ignores subscribe and error events, malformed JSON, and messages without a string event beginning with "ws". A received JSON array is handled item by item.
Examples
Example 1: Subscribe to order updates and stock prices
Set Channels to wsOrders:strategy_id and wsStockPrice:AAPL:NASDAQ, separated by a comma or newline; keep Reconnect enabled to retry after a disconnect.