Subscription Limitations in WebSocket for Market Data and Orders

Can I subscribe to both order updates and market data simultaneously through Websocket?

No, FYERS does not support simultaneous subscriptions to order updates and market data over a single WebSocket connection. Each stream is served via a dedicated socket for optimal performance and clarity in data processing.

Why separate connections?

FYERS maintains distinct WebSocket endpoints for:

  • Market Data Stream: Real-time updates for stock prices, LTP, OHLCV, etc.
  • Order Updates Stream: Live notifications for order status events like placement, execution, and cancellation.

This separation allows each data stream to be independently managed, with focused payload formats and handling logic. It also minimizes the risk of message collision and improves the reliability of real-time delivery.

Implementation note

  • Open one WebSocket connection for market data
  • Open a second WebSocket connection for order updates
  • Manage each stream with its own event listeners and handlers

What if...

ScenarioOutcome
You try to send both subscription types on the same socketOnly one will succeed; the other will be ignored or lead to errors
You manage each stream separatelyYou get clear, organized, and efficient data handling
You need to consolidate data from both streamsDo it application-side after processing each WebSocket separately

Last updated: 30 Jun 2025