4

I have been looking for a way to see the address's balance that doesn't belong to my own Bitcoin core wallet.

I don't like to use an external API, I have this full node and I really wonder if this is possible.

I saw this Pieter Wuille's answer: How to get an address's balance with the bitcoin client?

But it is an old answer when Bitcoin core even didn't support addresses as watch-only.

What I can understand from his answer is I can't see this information on my Bitcoin core, but right now with Bitcoin core v0.20.1, is that still not possible?

Luca Blight
  • 308
  • 1
  • 3
  • 10

1 Answers1

4
  1. Import addresses in bitcoin core and use listunspent or scantxoutset (scantxoutset doesn't require importing addresses as mentioned by sipa in the comments)

OR

  1. Setup open source block explorers that use bitcoin core and use their API to get the required results:

https://github.com/dgarage/NBXplorer

https://github.com/Blockstream/esplora

  • to add to 1. he can use this command: https://bitcoincore.org/en/doc/0.18.0/rpc/wallet/importaddress/ – Abdussamad Oct 02 '20 at 03:53
  • 2
    scantxoutset doesn't require importing – Pieter Wuille Oct 02 '20 at 05:29
  • Yes just realized it won't require addresses to be imported: https://github.com/bitcoin/bitcoin/pull/12196. I never used it and assumed it will work similar to listunspent because of https://bitcoin.stackexchange.com/questions/99278/bitcoin-scantxoutset-rpc-command-return-response-too-slow –  Oct 02 '20 at 11:27
  • I wouldn't like to add the address as watch-only because I would like to check many addresses's balance. Could you provide an example using scantxoutset with an address as a parameter? I saw the documentation but I didn't see how I can add an address in the scan objects. – Luca Blight Oct 02 '20 at 13:39
  • 2
    scantxoutset start "[\"addr(tb1qfg7456fh3u4wkff42zpznhjs3w5hcn469p3ymy)\"]" –  Oct 02 '20 at 15:09
  • https://i.imgur.com/bNsoGER.png –  Oct 02 '20 at 15:09
  • Thank you very much! That is exactly what I was looking for! – Luca Blight Oct 02 '20 at 16:44