Author

Topic: Get balance of address which is not from my bitcoind wallet (Read 4182 times)

full member
Activity: 157
Merit: 100
The answer in this sub-forum is the same as it was in the other sub-forum where you asked the exact same question:

As far as I'm aware, you'd have to process the entire blockchain using commands such as getblockhash, getblock, and getrawtransaction to search for any and all unspent transaction outputs associated with the address you are interested in.  Then you'd have to add up all the unspent outputs to arrive at a total balance.

To avoid having to repeatedly scan the entire blockchain, you'd probably be better off scanning it once and building a database table with the complete UTXO set.  Then you'd want to use blocknotify to update your UTXO table everytime a new block is created.  That way you could just query your UTXO table to find address balances.

Ye putting here just I hope more people could see this quesion.
This is a good way. Thank you. But would like to hear some more solutions.
Thanks~
J

If you have some familiarity with NodeJS, check https://github.com/bitpay/insight  It will take time the first time (as it builds indexes) but after that you can make such queries easily.
(edit: more clarity)
newbie
Activity: 13
Merit: 0
The answer in this sub-forum is the same as it was in the other sub-forum where you asked the exact same question:

As far as I'm aware, you'd have to process the entire blockchain using commands such as getblockhash, getblock, and getrawtransaction to search for any and all unspent transaction outputs associated with the address you are interested in.  Then you'd have to add up all the unspent outputs to arrive at a total balance.

To avoid having to repeatedly scan the entire blockchain, you'd probably be better off scanning it once and building a database table with the complete UTXO set.  Then you'd want to use blocknotify to update your UTXO table everytime a new block is created.  That way you could just query your UTXO table to find address balances.

Ye putting here just I hope more people could see this quesion.
This is a good way. Thank you. But would like to hear some more solutions.
Thanks~
J
legendary
Activity: 3472
Merit: 4794
The answer in this sub-forum is the same as it was in the other sub-forum where you asked the exact same question:

As far as I'm aware, you'd have to process the entire blockchain using commands such as getblockhash, getblock, and getrawtransaction to search for any and all unspent transaction outputs associated with the address you are interested in.  Then you'd have to add up all the unspent outputs to arrive at a total balance.

To avoid having to repeatedly scan the entire blockchain, you'd probably be better off scanning it once and building a database table with the complete UTXO set.  Then you'd want to use blocknotify to update your UTXO table everytime a new block is created.  That way you could just query your UTXO table to find address balances.
full member
Activity: 238
Merit: 109
Unless bitcoind has updated recently, you cant do this. You'll have to create your own database by crawling through the blockchain.
newbie
Activity: 13
Merit: 0
Hi,
I just installed bitcoin daemon on my server. Now I only can get address balance from my wallet.
Is there a way to get external addresses balance in my bitcoin daemon (PHP)?

(I don't want to use something like blockchain api ...)
(getreceivedbylabel is not working for me  Huh)

Cheers,
J
Jump to: