Title: Bitcoin Core Websocket RPC endpoint? Post by: rougeceo on December 28, 2017, 09:09:49 PM I just recently started running my own full node based on bitcoin core (https://github.com/bitcoin/bitcoin) which worked fine and I was apple to use HTTP post requests to communicate with the RPC endpoint. However I came across btcd (https://github.com/btcsuite/btcd) which is a full node written in Golang that supports websockets to push updates as soon as a new block is added for example. Are websockets supported in the bitcoin core version similar to the btcd version or how might I achieve the same thing?
I tried btcd but it is not as reliable at the moment and it is also slower than bitcoin core which will probably keep me from using it in production. Title: Re: Bitcoin Core Websocket RPC endpoint? Post by: achow101 on December 29, 2017, 07:49:52 AM Bitcoin Core has a startup option called blocknotify. You can give this a command which Bitcoin Core will run every time it receives a new block. This command can be a script which notifies something else.
You can also use the ZeroMQ notification framework which Bitcoin Core supports. Title: Re: Bitcoin Core Websocket RPC endpoint? Post by: rougeceo on December 29, 2017, 09:20:22 AM Thanks! That is exactly what I was looking for
|