<p>I had to solve the problem by listening to all transactions and checking the address as follows.</p>
<pre><code>ws.addEventListener('open', () =&gt; {
    ws.send(JSON.stringify({
        &quot;op&quot;: &quot;unconfirmed_sub&quot;
    }));
});

ws.addEventListener('message', (res) =&gt; {
    let data = JSON.parse(res.data);
    let outs = data.x.out;
    let out = outs.find(o =&gt; {
        return String(o.addr).toLowerCase() == receiver.toLowerCase();
    });
    if (out) {
        setTimeout(() =&gt; {
           startCallback(data);
        }, 6000);
    }
});
</code></pre>

CC BY-SA 4.0
2023-08-17T14:36:27.500Z
2023-08-17T14:36:27.500Z
BeycanDeveloper
<p>I started to listen to the &quot;wss://ws.blockchain.info/inv&quot; websocket address in the link below, but none of the transactions I made were sent to the messages. Later, when I tried the blockcyper's websocket, all the transactions came. Currently, I am looking for a free websocket service, not a paid one.</p>
<p><a href="https://www.blockchain.com/explorer/api/api_websocket" rel="nofollow noreferrer">https://www.blockchain.com/explorer/api/api_websocket</a></p>

<transactions><blockchain.info><api><websockets>
blockchain.com websocket not working
BeycanDeveloper
# blockchain.com websocket not working

(Asked by: username_0 on 2023-08-17)

I started to listen to the "wss://ws.blockchain.info/inv" websocket address in the link below, but none of the transactions I made were sent to the messages. Later, when I tried the blockcyper's websocket, all the transactions came. Currently, I am looking for a free websocket service, not a paid one.

<https://www.blockchain.com/explorer/api/api_websocket>

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


---

## 1 answers

### Answer by username_0 on 2023-08-17. Score: 0

I had to solve the problem by listening to all transactions and checking the address as follows.

```
ws.addEventListener('open', () => {
    ws.send(JSON.stringify({
        "op": "unconfirmed_sub"
    }));
});

ws.addEventListener('message', (res) => {
    let data = JSON.parse(res.data);
    let outs = data.x.out;
    let out = outs.find(o => {
        return String(o.addr).toLowerCase() == receiver.toLowerCase();
    });
    if (out) {
        setTimeout(() => {
           startCallback(data);
        }, 6000);
    }
});

```


---

