Bitcoin Forum
April 16, 2024, 03:56:03 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: get external addresses balance in bitcoind  (Read 5927 times)
JimmyGre (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
June 09, 2014, 05:53:13 AM
 #1

Hi,
I just installed bitcoin daemon on my server. Now I only can get address balance from my wallet.
Is that possible 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
1713282963
Hero Member
*
Offline Offline

Posts: 1713282963

View Profile Personal Message (Offline)

Ignore
1713282963
Reply with quote  #2

1713282963
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713282963
Hero Member
*
Offline Offline

Posts: 1713282963

View Profile Personal Message (Offline)

Ignore
1713282963
Reply with quote  #2

1713282963
Report to moderator
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


https://gliph.me/hUF


View Profile
June 09, 2014, 01:27:17 PM
Last edit: June 10, 2014, 02:08:03 AM by Newar
 #2

You mean an address that is not part of your wallet? That is not possible with bitcoind. That's why we have all those blockr.io, blockexplorer, blockchain.info etc. There's also some projects to parse the locally stored blockchain, I guess it could be achieved that way too.

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
DannyHamilton
Legendary
*
Offline Offline

Activity: 3360
Merit: 4570



View Profile
June 09, 2014, 01:59:57 PM
Last edit: June 09, 2014, 11:28:00 PM by DannyHamilton
 #3

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.
JimmyGre (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
June 11, 2014, 04:41:20 AM
 #4

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.

Um...where can I input the address that i'm interested in?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3360
Merit: 4570



View Profile
June 11, 2014, 12:26:01 PM
 #5

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.

Um...where can I input the address that i'm interested in?

I'm not sure what you're asking.

If you are asking how you can add an address to the bitcoin daemon, then you need to have the private key.  You can then issue the importprivkey command and the daemon will add the private key to its own list of private keys and calculate the bitcoin address.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!