Leveraging Data-WebSocket in API v3 for Real-Time Market Data

How can I use the data-websocket in API v3 to access real-time data?

Accessing live stock market data through FYERS' API v3 WebSocket is efficient and flexible. Whether you're building a lightweight price ticker or a full trading dashboard, the data-websocket supports both simplified and detailed market feeds in real time.

Real-time data options in API v3

The WebSocket in API v3 supports two primary modes for accessing real-time data:

  • Lite Mode (LTP updates only)
    For minimal bandwidth usage, you can subscribe to only the Last Traded Price (LTP). This is useful for watchlists and quick views where full data isn’t required.
  • Symbol Updates (OHLCV and more)
    Subscribing with symbolUpdate type provides detailed updates including:
    • Open
    • High
    • Low
    • Close
    • Volume

This mode is ideal for advanced dashboards, analytics tools, or any application needing comprehensive tick data.

How to implement

  • Connect to the WebSocket endpointwss://api.fyers.in/socket/v2/data/
  • Send authentication and subscription messages: Use your access token and the desired data type (lite or symbolUpdate).
  • Receive real-time tick streams: Parse the payloads according to your selected mode.
  • Manage subscriptions dynamically: You can add or remove symbols on the fly without reconnecting.
Visit the full Symbol Update documentation for technical specs and examples: Symbol Update API Docs

What if...

ScenarioOutcome
You only need price snapshotsUse lite mode for efficient LTP-only updates
You want full tick-level market detailUse symbolUpdate mode to receive OHLCV fields
You switch symbol sets during sessionSend new subscription messages; no reconnection needed

Last updated: 30 Jun 2025