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

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

<ul>
<li><a href="https://github.com/coinbase/toshi" rel="nofollow">https://github.com/coinbase/toshi</a></li>
<li><a href="https://github.com/lian/bitcoin-ruby" rel="nofollow">https://github.com/lian/bitcoin-ruby</a></li>
</ul>

CC BY-SA 3.0
2015-07-20T22:44:36.277Z
2015-07-20T22:44:36.277Z
Josh Cincinnati
<p>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.</p>

<p>Here's a simple javascript implementation I made with chain.com websocket:  <a href="http://jsfiddle.net/93vrLet3/1/" rel="nofollow">http://jsfiddle.net/93vrLet3/1/</a></p>

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

CC BY-SA 3.0
2015-07-16T12:54:38.643Z
2015-07-16T12:54:38.643Z
m1xolyd1an
<p>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...</p>

CC BY-SA 3.0
2015-07-16T10:44:49.200Z
2015-07-16T10:44:49.200Z
Gideon Greenspan
<p>I want to scan new transactions as they are added to the block chain. </p>

<p>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?</p>

CC BY-SA 4.0
2018-08-09T20:38:17.020Z
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
<transactions><blockchain><block><ruby>
How to monitor the blockchain for new blocks
Ethan
# How to monitor the blockchain for new blocks

(Asked by: username_0 on 2015-07-15)

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?

**Tags:** transactions, blockchain, block, ruby

> **Comments:**
> **username_1**: 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  

---

## 3 answers

### Answer by username_2 on 2015-07-20. Score: 1

Full disclosure, I'm [BlockCypher's](http://www.blockcypher.com/) 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:

* <https://github.com/coinbase/toshi>
* <https://github.com/lian/bitcoin-ruby>


---

### Answer by username_3 on 2015-07-16. Score: 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/>


---

### Answer by username_4 on 2015-07-16. Score: 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...


---

