<p>There is now the <code>addr_unsub</code> command taking an <code>addr</code> parameter to unsubscribe address updates.</p>

CC BY-SA 3.0
2017-07-07T10:00:48.857Z
2017-07-07T10:00:48.857Z
alcio
<p>A solution I've thought about is to disconnect and then reconnect and subscribe to the few addresses I must watch.</p>

CC BY-SA 3.0
2014-08-21T15:29:23.400Z
2014-08-21T15:29:23.400Z
arhuaco
<p>According to the docs, Blockchain.info provides a websocket API that streams a few things:</p>

<ol>
<li><p>All unconfirmed transactions using "op: unconfirmed_sub"</p></li>
<li><p>New blocks &amp; the data they contain using "op: blocks_sub"</p></li>
<li><p>All new tx that are detected at a subscribed address using "op: addr_sub", "addr": the address you want notifications.</p></li>
</ol>

<p>I'm mostly interested in #3. If I send the "op: addr_sub" command, my websocket client will show all new tx from the moment of that subscription until the socket connection is closed. That's all well and good, but......</p>

<p>Is there a way to UNSUBSCRIBE from an address in the addr_sub list?
There appears to be a socket command "op: unconfirmed_unsub" which will halt the subscription for all unconfirmed tx, but no analog for individual address.</p>

<p>Does anyone know the answer for this? How to unsubscribe from an individually watched address?  If my purposes have been satisfied for watching an address and I wish to free up those resources how do I go about doing that? Surely, I don't have to close the entire connection and re-subscribe to everything BUT that address?</p>

<p>I'd imagine there has to be some way to achieve this without requiring the subscription to be immortal.... The docs from their site <a href="https://blockchain.info/api/api_websocket" rel="noreferrer">https://blockchain.info/api/api_websocket</a> are very sparse</p>

<transactions><address><blockchain.info><websockets>
Remove address sub from blockchain websocket API
ACVentures
# Remove address sub from blockchain websocket API

(Asked by: username_0 on 2014-04-01)

According to the docs, Blockchain.info provides a websocket API that streams a few things:

1. All unconfirmed transactions using "op: unconfirmed\_sub"
2. New blocks & the data they contain using "op: blocks\_sub"
3. All new tx that are detected at a subscribed address using "op: addr\_sub", "addr": the address you want notifications.

I'm mostly interested in #3. If I send the "op: addr\_sub" command, my websocket client will show all new tx from the moment of that subscription until the socket connection is closed. That's all well and good, but......

Is there a way to UNSUBSCRIBE from an address in the addr\_sub list?
There appears to be a socket command "op: unconfirmed\_unsub" which will halt the subscription for all unconfirmed tx, but no analog for individual address.

Does anyone know the answer for this? How to unsubscribe from an individually watched address? If my purposes have been satisfied for watching an address and I wish to free up those resources how do I go about doing that? Surely, I don't have to close the entire connection and re-subscribe to everything BUT that address?

I'd imagine there has to be some way to achieve this without requiring the subscription to be immortal.... The docs from their site <https://blockchain.info/api/api_websocket> are very sparse

**Tags:** transactions, address, blockchain.info, websockets


---

## 2 answers

### Answer by username_1 on 2017-07-07. Score: 1

There is now the `addr_unsub` command taking an `addr` parameter to unsubscribe address updates.


---

### Answer by username_2 on 2014-08-21. Score: 0

A solution I've thought about is to disconnect and then reconnect and subscribe to the few addresses I must watch.


---

