How can I stop receiving real-time updates for certain stock symbols?
If you're receiving real-time market data for stock symbols you no longer need, FYERS makes it easy to unsubscribe from them through the Market Data WebSocket API. This ensures your application stays efficient and avoids unnecessary bandwidth or data processing.
How to unsubscribe from real-time stock updates
- Ensure WebSocket connection is active
Your application must maintain an open connection to the FYERS Market Data WebSocket. Send an unsubscribe message
Use the following message format:
{
"symbol": ["NSE:RELIANCE-EQ", "NSE:TCS-EQ"],
"type": "unsubscribe"
}
Replace the symbols with the ones you want to stop tracking.
- Confirm unsubscription
FYERS will send an acknowledgment message. Ensure your application handles this response correctly. - Update your internal tracking
Remove the unsubscribed symbols from your app's local subscription list or UI, if applicable.
What if...
Scenario | Outcome |
---|
You send an unsubscribe request for a symbol you didn’t subscribe to | The server ignores it without error—safe to send |
You still receive data after unsubscribing | Ensure the symbol format is correct and the connection didn’t reset |
You want to stop all real-time updates | Either close the WebSocket or send an unsubscribe for all active symbols |
Always keep your symbol list updated. Unsubscribing from unused tickers improves app performance and reduces potential rate limit issues.
Sending too many subscribe/unsubscribe requests in quick succession may result in throttling or temporary disconnection. Use debouncing or batching where possible.
Last updated: 30 Jun 2025
Related Articles
How can developers incorporate real-time stock data into their applications?
Adding real-time stock data to your application can significantly enhance its value for users who need live market insights. FYERS provides a dedicated Market Data WebSocket API that allows developers to receive streaming updates for stock prices, ...
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 ...
Does FIA use real-time market data in screeners?
Yes, FIA uses real-time market data to generate screener results. This means the moment a stock meets your conditions—whether it's a price breakout, volume spike, or open interest surge—it shows up in your results instantly. You don’t have to refresh ...
What is the "lite mode" feature in the data-websocket of API v3, and how does it provide live LTP updates for symbols?
The "lite mode" in FYERS API v3 WebSocket is designed for developers who need quick access to price updates without extra data. It’s a lightweight, real-time streaming option focused exclusively on delivering the Last Traded Price (LTP) for ...
Can I Check My Portfolio Performance and P&L in Real-Time Using FIA?
Yes, FIA (FYERS Intelligent Assistant) provides real-time access to your portfolio’s performance. Once logged in, you can instantly view your total invested amount, current portfolio value, and profit & loss—both realised and unrealised. Portfolio ...