I am trying to make a query about a bitcoin address's btc amount. As I've read, getreceivedbyaddress rpc command can only be used for the addresses of a wallet that one owns and that command is awallet command. I want to make a query about any bitcoin addresses btc amount. Is it possible? If yes, how do I do it?


You can use the new scantxoutset method to check for UTXOs matching a given script, address, or key descriptor.

For example, to scan an address, you can use:

bitcoin-cli scantxoutset start "[\"addr(1....)\"]"
| improve this answer | |
  • Does it scan all the txs in the bitcoin db to find that specific tx which that specific adress is in the utxo set of that tx? – Efe Cini Feb 11 at 22:35
  • It only scans the txs in the utxo set - any outputs that have already been spent will not be considered – Raghav Sood Feb 11 at 22:40
  • When I run that comment, it takes 1-2 min but when I do the query on blockchain.info, it happens in seconds. Why? Can it be that they downloaded the bitcoin database and tweaked it so it computes very fast? I am asking because I need fast results too if possible. Do you have an idea? – Efe Cini Feb 13 at 22:54
  • 1
    @EfeCini Explorers extract all this information into a separate database optimized for their query patterns. You will not be able to match that speed using just Bitcoin Core, and should consider running a service such as Insight or ElectrumX on top of it – Raghav Sood Feb 14 at 3:35

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.