Blockcypher Websocket endpoint not working

553 Views Asked by At

I am using the Blockcypher API for test bitcoin transactions and I have troubles with the websocket API endpoint. When sending the regular ping object after creating a new Websocket it works fine:

this.ws.onopen = () => {
  this.ws.send(JSON.stringify({"event": "ping"})) 

but when trying to check the confidence of a transaction like this we get an error

this.ws.onopen = () => { this.ws.send(JSON.stringify({event: 'tx-confidence', address:'<bitcoin address as string>', confidence:0.9}))

Is there anything wrong with the datatypes? Any help would be great!

API reference Event reference

1

There are 1 best solutions below

0
On

You probably reached the limit. Consider adding your BlockCypher token at the end of the websocket URL. This was somehow forgotten in the documentation.