Bitcoin Forum
May 25, 2024, 01:18:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What would be the best way to get the balance of an address?  (Read 1183 times)
Elwar (OP)
Legendary
*
Offline Offline

Activity: 3598
Merit: 2386


Viva Ut Vivas


View Profile WWW
August 10, 2012, 09:16:22 PM
 #1

I am looking to check an address to see if it is empty and if not empty, check to see how many bitcoins the address contains.

Would I be able to do this with a call from bitcoinj or would I need to add up transactions through the blockchain or what?

First seastead company actually selling sea homes: Ocean Builders https://ocean.builders  Of course we accept bitcoin.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
August 10, 2012, 11:36:58 PM
 #2

Would I be able to do this with a call from bitcoinj or would I need to add up transactions through the blockchain or what?

There is a service that might help, if you weren't aware of it:

 - http://btcbalance.net


Also, via API:
 - https://blockexplorer.com/q/addressbalance/<address>
 - http://blockchain.info/q/addressbalance/<address>

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Elwar (OP)
Legendary
*
Offline Offline

Activity: 3598
Merit: 2386


Viva Ut Vivas


View Profile WWW
August 11, 2012, 12:48:07 AM
 #3

Would I be able to do this with a call from bitcoinj or would I need to add up transactions through the blockchain or what?

There is a service that might help, if you weren't aware of it:

 - http://btcbalance.net


Also, via API:
 - https://blockexplorer.com/q/addressbalance/<address>
 - http://blockchain.info/q/addressbalance/<address>

So I assume that means that parsing the full blockchain is the way to go. I cannot rely on a third party.

First seastead company actually selling sea homes: Ocean Builders https://ocean.builders  Of course we accept bitcoin.
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
August 11, 2012, 01:04:50 AM
 #4

So I assume that means that parsing the full blockchain is the way to go. I cannot rely on a third party.

Check out blockparser.  The command would be something like blockparser tally <address>.  Requires synced blockchain from original client, Ubuntu x86-64.  There may be a way to query arbitrary addresses through the original client's RPC commands, too.

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
August 11, 2012, 08:07:19 AM
 #5

I assume that means that parsing the full blockchain is the way to go.

There are others;

 - libBitcoin
 - Armory (see Extras)
 - Bitcoin ABE
 - BitcoinJ
 - BitcoinJS

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


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!