Not considering any external services, is there any way (opensource implementation) that would keep up with the blockchain and expose an API with the same functionality as the original getreceivedbyaddress method in bitcoind?

To emphasize, I need the API to return the sum of coins ever received on that address, NOT a current balance. Preferably, this would work without the need of registering/importing that address in advance (so the system should auto-index all addresses spotted in the blockchain).

There's an old (0.8+) fork of bitcoind (https://github.com/TOCICI/bitcoin) that adds importaddress RPC call, which is the best I could find so far (even though it's not optimal since it requires the addresses to be imported first).

Also, there's a continuing discussion going on about watch-only wallets, but I'm afraid (correct me if I'm wrong) this will only provide address balance, not the total amount ever sent.

I've also considered using Electrum server for this, but was only able to see that one can get a current balance of an address.

Any ideas?

2 Answers 2


You could take a look at Obelisk & Sx. If you want something you could also host yourself. Sx has an sx balance <ADDRESS> command which also has a Total received field. Which I think is what you are looking for. You can also interface to an Obelisk server via the python libs.

  • Didn't know sx can do this (apparently a lot has changed since the last time I checked). Will look into Obelisk, but I already sense it's exactly what I was looking for! Awesome!
    – knaperek
    Commented May 13, 2014 at 9:41

Bitcoin Core 0.10 was just released with support for watch-only wallets.

You can use the importaddress command to make a wallet consider the address to be belonging to it, and track incoming payments to it. getreceivedbyaddress will work as expected in that case. In fact, Bitcoin Core does not support an "address balance" feature at all.

It does indeed require you to import the address in advance (or go through a lengthy rescanning procedure). The upside is that this approach scales much better (it doesn't require a fully indexed blockchain, and is compatible with future pruning features).

  • will listtransactions work as normal?
    – Fantastory
    Commented Nov 10, 2016 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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