Bitcoin Forum
November 17, 2017, 06:05:52 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: get external addresses balance in bitcoind  (Read 5866 times)
JimmyGre
Newbie
*
Offline Offline

Activity: 13


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
1510941952
Hero Member
*
Offline Offline

Posts: 1510941952

View Profile Personal Message (Offline)

Ignore
1510941952
Reply with quote  #2

1510941952
Report to moderator
1510941952
Hero Member
*
Offline Offline

Posts: 1510941952

View Profile Personal Message (Offline)

Ignore
1510941952
Reply with quote  #2

1510941952
Report to moderator
1510941952
Hero Member
*
Offline Offline

Posts: 1510941952

View Profile Personal Message (Offline)

Ignore
1510941952
Reply with quote  #2

1510941952
Report to moderator
A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1510941952
Hero Member
*
Offline Offline

Posts: 1510941952

View Profile Personal Message (Offline)

Ignore
1510941952
Reply with quote  #2

1510941952
Report to moderator
Newar
Legendary
*
Offline Offline

Activity: 1274


https://gliph.me/hUF


View Profile
June 09, 2014, 01:27:17 PM
 #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
*
Online Online

Activity: 1974



View Profile
June 09, 2014, 01:59:57 PM
 #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
Newbie
*
Offline Offline

Activity: 13


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
*
Online Online

Activity: 1974



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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!