1

The main purpose is to have "payment done" confirmation as fast as possible, within some seconds.

First option is to implement it myself. Now I have the following implementation based on querying Bitoin-qt from .NET API: I receive all new transaction IDs using getrawmempool and then iterate through each of them to get details using getrawtransaction to find transactions with addresses I want to monitor.

2 years ago it used to work well, but now I see it performs slower and slower. So, I think bitcoin-qt + .NET API is not the approach which can increase monitor time.

Another option is to use third-party services, like blockchain.info, which can be used in my (commercial) application.

  • 1
    Remember that zero-confirmation is dangerous and it does NOT mean "payment done". Checking transactions using your own node is better than using third parties, as you don't need to trust anyone. ( Using bitcoind running in the background instead of bitcoin-qt GUI might make more sense.) On the other hand, you might want to ALSO use third parties to try to make use of their multiple nodes located in different places around the world and hope that you can detect any double spends that way. But even then: zero-confirmation IS dangerous! – Jannes Dec 4 '15 at 16:52
  • Yes be very carful with zero-confirmations. I'd recommend a third-party service for this, I've personally used both blockchainwebhooks.com and blockcypher.com - Blockcypher has more detail, but BlockchainWebHooks is much more affordable (although both have free plans) – sizzlecookie Aug 4 '18 at 14:22
3

You can use the importaddress functionality to make the Bitcoin Core wallet (bitcoind or bitcoin-qt) treat certain addresses as its own, even though it does not have the key for them.

This will make them appear in the outputs of RPCs like listtransactions, getreceivedbyaddress, listunspent and getbalance. It will also trigger notifications through -walletnotify and the recently added ZMQ mechanism.

0

I use block.io API to detect zero confirmation incoming transactions on Liberty Music Store. block.io can monitor transactions for your own wallet or you can subscribe to arbitrary bitcoin addresses.

The trade off is between easy and fast confirmations - block.io has robust webhooks, distributed bitcoin nodes and easy API allowing detecting transactions faster than running a single node yourself. A single node is safer in the point of view you cannot trust third parties with your transactions. Furthermore running a full node is resource intensive as blockchain data is several gigabytes and mempool too.

0

I think that using Bitcoin Core importaddress may be good solution.

However if you don't want to sync whole blockchain you may use Electrum and it's JSONRPC interface: http://docs.electrum.org/en/latest/merchant.html#jsonrpc-interface

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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