Bitcoin Forum
October 24, 2018, 06:18:10 AM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin Core Websocket RPC endpoint?  (Read 37 times)
rougeceo
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 28, 2017, 09:09:49 PM
 #1

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.
1540361890
Hero Member
*
Offline Offline

Posts: 1540361890

View Profile Personal Message (Offline)

Ignore
1540361890
Reply with quote  #2

1540361890
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1540361890
Hero Member
*
Offline Offline

Posts: 1540361890

View Profile Personal Message (Offline)

Ignore
1540361890
Reply with quote  #2

1540361890
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1568
Merit: 1709


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
December 29, 2017, 07:49:52 AM
 #2

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.

rougeceo
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 29, 2017, 09:20:22 AM
 #3

Thanks! That is exactly what I was looking for
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!