<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Websocket unsubscribe from instrument]]></title><description><![CDATA[<p dir="auto">I am able to subscribe and even send an additional instrument to be added to my subscription list. As in the example below, I first start streaming for 26000 data and after 5s, even 26009 data is sent along with 26000 data.</p>
<p dir="auto">token = "nse_cm|26000"<br />
ss.connect(threaded=True)<br />
time.sleep(5)<br />
token="nse_cm|26009<br />
ss.send_request(token, "mw")</p>
<p dir="auto">However, I want to unsubscribe from 26000 and I'm not able to do that. The docs say (<a href="https://smartapi.angelbroking.com/docs/WebSocket" target="_blank" rel="noopener noreferrer nofollow ugc">https://smartapi.angelbroking.com/docs/WebSocket</a>) that a blank string has to be sent to unsubscribe. I tried this piece of code but I still end up getting data for both instruments. What should I do to stop getting 26000 data and only get 26009 after a certain time? I cannot kill the script and restart, this has to be done within the code.</p>
<p dir="auto">token = "nse_cm|26000"<br />
ss.connect(threaded=True)<br />
time.sleep(5)<br />
<strong>ss.send_request("", "mw")</strong><br />
token="nse_cm|26009<br />
ss.send_request(token, "mw")</p>
]]></description><link>https://smartapi.angelone.in/smartapi/forum/topic/575/websocket-unsubscribe-from-instrument</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 10:37:50 GMT</lastBuildDate><atom:link href="https://smartapi.angelone.in/smartapi/forum/topic/575.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Apr 2021 17:59:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Websocket unsubscribe from instrument on Tue, 13 Apr 2021 08:38:59 GMT]]></title><description><![CDATA[<p dir="auto">hi <a class="plugin-mentions-user plugin-mentions-a" href="https://smartapi.angelone.in/smartapi/forum/uid/956">@frog_26</a>  please go through this thread<br />
<a href="https://smartapi.angelbroking.com/topic/51/how-to-unsubscribe-symbol-from-websocket?_=1618296924024" target="_blank" rel="noopener noreferrer nofollow ugc">https://smartapi.angelbroking.com/topic/51/how-to-unsubscribe-symbol-from-websocket?_=1618296924024</a></p>
]]></description><link>https://smartapi.angelone.in/smartapi/forum/post/3282</link><guid isPermaLink="true">https://smartapi.angelone.in/smartapi/forum/post/3282</guid><dc:creator><![CDATA[admin]]></dc:creator><pubDate>Tue, 13 Apr 2021 08:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to Websocket unsubscribe from instrument on Tue, 13 Apr 2021 08:15:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://smartapi.angelone.in/smartapi/forum/uid/956">@frog_26</a> we cannot unsubscribe a single instrument from  the websocket.</p>
]]></description><link>https://smartapi.angelone.in/smartapi/forum/post/3281</link><guid isPermaLink="true">https://smartapi.angelone.in/smartapi/forum/post/3281</guid><dc:creator><![CDATA[admin]]></dc:creator><pubDate>Tue, 13 Apr 2021 08:15:04 GMT</pubDate></item><item><title><![CDATA[Reply to Websocket unsubscribe from instrument on Tue, 13 Apr 2021 08:12:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://smartapi.angelone.in/smartapi/forum/uid/1">@admin</a> has the unsubscribe feature been released yet?</p>
]]></description><link>https://smartapi.angelone.in/smartapi/forum/post/3280</link><guid isPermaLink="true">https://smartapi.angelone.in/smartapi/forum/post/3280</guid><dc:creator><![CDATA[grewal]]></dc:creator><pubDate>Tue, 13 Apr 2021 08:12:11 GMT</pubDate></item></channel></rss>