TradingView WebSocket icon

TradingView WebSocket

Stream real-time TradingView data via WebSocket with Redis buffering

TradingView WebSocket

AI-generated

Summary

Stream real-time TradingView data for specified symbols through a WebSocket connection with optional Redis message buffering, batch processing, filtering, and rate limiting.

Inputs

  • Stream Type (required) — Select the type of TradingView data stream to monitor (Price Updates, Order Book, Trades, News, Alerts, or Social Feed).
  • Symbols (required) — Comma-separated list of symbols to stream (e.g., BTCUSD,ETHUSD,AAPL).
  • WebSocket Configuration — Customize connection settings including WebSocket URL, automatic reconnection behavior, reconnection delay, max reconnect attempts, and heartbeat interval.
  • Data Processing — Configure message processing options such as batch mode (with size and timeout), JavaScript expression for message filtering, and maximum message rate limit (messages per second).
  • Redis Buffering — Optional settings to enable buffering incoming messages in a Redis stream for enhanced reliability with parameters for Redis connection URL, buffer size, TTL, and stream name.

Output shape

a continuous stream of JSON messages emitted as workflow output; messages correspond to live TradingView data matching the selected stream type and symbols, optionally batched per configuration.

Messages can be filtered, rate-limited, or processed in batches. If Redis buffering is enabled, messages are stored in Redis with configured retention. The node handles automatic reconnection with configurable retry limits and delays. The output includes metadata such as stream type, timestamps, and symbol identifiers. Streaming continues until the workflow is stopped or connection is lost beyond configured reconnection attempts.

Examples

Example 1: Stream real-time price updates for BTCUSD and ETHUSD

Set 'Stream Type' to 'Price Updates' and 'Symbols' to 'BTCUSD,ETHUSD'. Optionally adjust reconnection or batch processing settings.

Example 2: Monitor trade alerts as batched messages with filtering

Set 'Stream Type' to 'Alerts', enable 'Process in Batches' with desired batch size and timeout, and provide a 'Message Filter' expression to include only alerts matching criteria.

Discussion