Monitor Transactions on Bitcoin Addresses with Python and TxWatcher

I wanted an easy way to monitor Bitcoin addresses for transactions with Python and without having to download the entire block chain, so I created a module that lets you watch Bitcoin addresses through Blockchain Websocket API and perform custom callback: TxWatcher.

You can install it with pip, the code is hosted on Github.

$ pip install txwatcher

Here is an example:

from txwatcher import TxWatcher

w = TxWatcher(['18eGUUxUsSetQYxJcQXEQTjSCUETEFeA4E'])

def tx_printer(tx):

# You can add as many callbacks as you want
w.on_tx += tx_printer

# Blocking way
# or
import thread
thread.start_new_thread(w.run_forever, ())

# Do some work


Check out the README on GitHub.


Please don't hesitate if you have any feedback/question/suggestion !

You should follow me on Twitter

Share this article

Tip with Bitcoin

Tip me with Bitcoin and vote for this post!


Leave a comment

© Thomas Sileo. Powered by Pelican and hosted by DigitalOcean.