Bitcoin Forum
December 18, 2017, 07:01:56 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin Websocket Server/API  (Read 1410 times)
asoltys
Newbie
*
Offline Offline

Activity: 19


View Profile
May 10, 2014, 03:20:42 AM
 #1

I've found https://blockchain.info/api/api_websocket really handy for watching addresses and transactions in realtime web apps with javascript.  I tried to ask blockchain.info if the implementation of this API is open source somewhere and didn't get a response.  I don't see it on their github page.  Does anyone know how this is implemented or if there are any open source alternatives that I could host myself?  Any ideas what technologies might be used to create an API like this?  socket.io? bitcoind or bitcoinj?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513623716
Hero Member
*
Offline Offline

Posts: 1513623716

View Profile Personal Message (Offline)

Ignore
1513623716
Reply with quote  #2

1513623716
Report to moderator
1513623716
Hero Member
*
Offline Offline

Posts: 1513623716

View Profile Personal Message (Offline)

Ignore
1513623716
Reply with quote  #2

1513623716
Report to moderator
General
Member
**
Offline Offline

Activity: 106


View Profile
May 10, 2014, 05:56:11 AM
 #2

Interesting.  Hadn't known about this functionality.

Looked over the API docs. and didn't see anything about it there.

If they still don't respond I'd assume there isn't an API for it.

mriou
Newbie
*
Offline Offline

Activity: 26


View Profile
May 12, 2014, 06:02:04 PM
 #3

You can find something similar here:

http://dev.blockcypher.com/#websockets

Those are mostly private APIs but Websockets aren't hard to put in place. You can use socket.io as you mentioned for the websocket server, the difficulty is more getting access to the original event, which won't be websocket.
davec
Jr. Member
*
Offline Offline

Activity: 39


View Profile
May 12, 2014, 06:36:37 PM
 #4

It obviously largely depends on your application, but btcd (an alternative bitcoin core implementation) natively provides support for Websockets and has an extension API that offers exactly this type of capability.  See the btcd JSON-RPC API wiki for the available Websocket extension methods and notifications.

There is sample node.js code on the linked wiki, and it works fine from Javascript through a broswer too.

Along the same lines, if you're willing to use Go for your application, there is a robust package, btcrpcclient which supports Websockets and the btcd extensions to make it easy to create a robust RPC client that automatically maintains the Websocket connection including auto-reconnect capability should the connection be interrupted for some reason and many other features.
biteasy
Jr. Member
*
Offline Offline

Activity: 55

Biteasy.com


View Profile WWW
May 14, 2014, 01:03:26 PM
 #5

You can also try our own Websockets API as well, although is not open source:
https://support.biteasy.com/kb/websockets-api

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!