Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: SgtSpike on July 04, 2011, 07:57:45 AM



Title: How would I check the balance of an address not in my wallet?
Post by: SgtSpike on July 04, 2011, 07:57:45 AM
How would I check the balance of an address not in my wallet?  And not through blockexplorer or a similar service, but directly through bitcoind?  Is there an RPC call to do this?

Also, is there a list of all RPC calls that are available somewhere?  I looked around on the wiki, and only saw examples of a few RPC calls, but not a list of all of them that are available.


Title: Re: How would I check the balance of an address not in my wallet?
Post by: titeuf_87 on July 04, 2011, 10:13:30 AM
How would I check the balance of an address not in my wallet?  And not through blockexplorer or a similar service, but directly through bitcoind?  Is there an RPC call to do this?
This isn't possible with the standard client. You could try writing a script (possibly using bitcointools) to parse the blockchain to give you those results.

Quote
Also, is there a list of all RPC calls that are available somewhere?  I looked around on the wiki, and only saw examples of a few RPC calls, but not a list of all of them that are available.
There is here (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list).


Title: Re: How would I check the balance of an address not in my wallet?
Post by: Jack of Diamonds on July 04, 2011, 06:06:31 PM
Daemon doesn't support that by default.

If you have spare time though, you could improvise a fetch script for BE which you can integrate in the client binary before compiling.

Then there's RPC for
Code:
<bitcoinaddress> [minconf= your value]

But it doesn't necessarily indicate the balance of that wallet since some of it might have been spent.


Title: Re: How would I check the balance of an address not in my wallet?
Post by: gigabytecoin on July 05, 2011, 03:22:33 AM
Blockexplorer.com???


Title: Re: How would I check the balance of an address not in my wallet?
Post by: TiagoTiago on July 05, 2011, 03:47:33 AM
Blockexplorer.com???
How would I check the balance of an address not in my wallet?  And not through blockexplorer or a similar service, but directly through bitcoind?  Is there an RPC call to do this?...


Title: Re: How would I check the balance of an address not in my wallet?
Post by: gochk on July 05, 2011, 04:15:13 PM
I hope this is not hijacking this thread. On a related subject matter, after we change address of the wallet, can we still get the btc going to the previous addresses?


Title: Re: How would I check the balance of an address not in my wallet?
Post by: SgtSpike on July 05, 2011, 04:16:59 PM
Ok, thanks for the answers guys.  I'm not a c programmer, so I can't do compiling or any of that.  Ah well, I'll just find a different solution to what I am planning to do.

I wonder how block explorer does it...


Title: Re: How would I check the balance of an address not in my wallet?
Post by: joepie91 on July 05, 2011, 06:05:17 PM
Ok, thanks for the answers guys.  I'm not a c programmer, so I can't do compiling or any of that.  Ah well, I'll just find a different solution to what I am planning to do.

I wonder how block explorer does it...
I believe it analyzes the entire blockchain, with all transactions that were sent to and from an address, and uses that to calculate and store the balance of an address.


Title: Re: How would I check the balance of an address not in my wallet?
Post by: SgtSpike on July 05, 2011, 06:16:44 PM
Ok, thanks for the answers guys.  I'm not a c programmer, so I can't do compiling or any of that.  Ah well, I'll just find a different solution to what I am planning to do.

I wonder how block explorer does it...
I believe it analyzes the entire blockchain, with all transactions that were sent to and from an address, and uses that to calculate and store the balance of an address.
Right, but HOW does it analyze the blockchain, if the default client doesn't allow it?  Do they manually parse the blockchain files?  Do they run a custom client?

I doubt that those questions are answerable by anyone reading this thread, so it's more of a rhetorical question.


Title: Re: How would I check the balance of an address not in my wallet?
Post by: drawoc on July 05, 2011, 06:23:59 PM
Right, but HOW does it analyze the blockchain, if the default client doesn't allow it?  Do they manually parse the blockchain files?  Do they run a custom client?

They use this patch: http://forum.bitcoin.org/?topic=724.0 (http://forum.bitcoin.org/?topic=724.0)

Block explorer can also dump out raw JSON for a block, very similar to the output from that patch. For example: http://blockexplorer.com/rawblock/00000000000004b956dbd1717895d8e38275c52990a6097535aaf1c7618ab58f (http://blockexplorer.com/rawblock/00000000000004b956dbd1717895d8e38275c52990a6097535aaf1c7618ab58f)


Title: Re: How would I check the balance of an address not in my wallet?
Post by: SgtSpike on July 05, 2011, 07:20:50 PM
Right, but HOW does it analyze the blockchain, if the default client doesn't allow it?  Do they manually parse the blockchain files?  Do they run a custom client?

They use this patch: http://forum.bitcoin.org/?topic=724.0 (http://forum.bitcoin.org/?topic=724.0)

Block explorer can also dump out raw JSON for a block, very similar to the output from that patch. For example: http://blockexplorer.com/rawblock/00000000000004b956dbd1717895d8e38275c52990a6097535aaf1c7618ab58f (http://blockexplorer.com/rawblock/00000000000004b956dbd1717895d8e38275c52990a6097535aaf1c7618ab58f)
Thanks.


Title: Re: How would I check the balance of an address not in my wallet?
Post by: kokjo on July 05, 2011, 07:24:09 PM
I hope this is not hijacking this thread. On a related subject matter, after we change address of the wallet, can we still get the btc going to the previous addresses?
NO! they will be gone forever! MUHAHHAHAHAHAH!

all the addresses are stored in the wallet, yes you can stil use your bitcoins