Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I searched with all terms I could think of, but could not find anything in direction that helps me.

In the context of a research project, I am trying to listen to all transactions that are broadcasted over the Bitcoin network. So we are especially interested in transactions, that will not occur in the blockchain later (e.g. got "lost", took very long to get accepted, double spent, etc.).

I know of bitcoind, but the list of transactions is rather pull-oriented, whereby I'd like to have something like a callback, that informs me of a new transaction.

Can anybody recommend any software/libs/projects here?

PS: all I intend to do is read-only, so there does not have to be any wallet-support etc. I just like to get a deeper view into how the Bitcoin network actually works.

share|improve this question
I'm interested in your project. Please add me to your IM client to discuss it: – user3158 Mar 5 '13 at 3:35
Did you finalize on bitcoinj? Can you share sample code? – Jus12 Oct 28 '14 at 4:49
up vote 4 down vote accepted

You can do this using BitcoinJ by implementing the PeerEventListener interface.

The OnTransaction will be called every time a new Transaction is broadcast out and received from a Peer.

share|improve this answer
Thanks! Works like a charm. – Bouncner Mar 6 '13 at 19:43

Beginning with v0.8.2 of the Bitcoin-Qt/bitcoind client is -walletnotify option that can run a process when a transaction that affects the wallet is seen.

share|improve this answer
Ah, that might be even nicer. Thanks! – Bouncner May 28 '13 at 17:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.