How to monitor the blockchain for new blocks

0

I want to scan new transactions as they are added to the block chain.

Does anyone have a suggestion on how to do this. Are there any APIs that allow for this? Or is there a way to directly tap into the bitcoin network with ruby?

Ethan

Posted 2015-07-15T03:10:22.120

Reputation: 31

I’d recommend https://blockchainwebhooks.com or https://blockcypher.com for handling this - I’ve used both services, they’ve both been stable and reliable. Blockchain WebHooks is much more affordable if you need to scale

sizzlecookie 2018-08-09T20:38:17.020

Answers

1

Full disclosure, I'm BlockCypher's Developer Advocate. We have both a WebSockets/WebHooks API for unconfirmed transactions, which you can read about here, along with a Ruby example: http://dev.blockcypher.com/?ruby#using-webhooks .

But if you wanted to run a local implementation that's primarily Ruby-based, you could try Coinbase's Toshi, or bitcoin-ruby:

Josh Cincinnati

Posted 2015-07-15T03:10:22.120

Reputation: 645

0

You should starting by running Bitcoin Core, the reference client for the bitcoin network. Then you will find a ton of libraries (including Ruby) that can work with that to let you see new transactions, blocks, etc...

Gideon Greenspan

Posted 2015-07-15T03:10:22.120

Reputation: 324

0

Yes, what you are looking for is websocket API. There are several APIs for this, but the most popular are blockchain.info and chain.com.

Here's a simple javascript implementation I made with chain.com websocket: http://jsfiddle.net/93vrLet3/1/

If you want to learn more, here's a step-by-step video and written tutorial on the subject: http://btcthreads.com/display-real-time-bitcoin-transactions-with-jquery-and-websocket/

m1xolyd1an

Posted 2015-07-15T03:10:22.120

Reputation: 3 356