Bitcoin Forum
November 13, 2024, 08:57:47 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How would I check the balance of an address not in my wallet?  (Read 2078 times)
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 04, 2011, 07:57:45 AM
 #1

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.
titeuf_87
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
July 04, 2011, 10:13:30 AM
 #2

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.

15kfBM3TQ4PGzL7cKncU3su2pH7ZJmiLtr
Jack of Diamonds
Sr. Member
****
Offline Offline

Activity: 252
Merit: 251



View Profile
July 04, 2011, 06:06:31 PM
 #3

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.

1f3gHNoBodYw1LLs3ndY0UanYB1tC0lnsBec4USeYoU9AREaCH34PBeGgAR67fx
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


View Profile
July 05, 2011, 03:22:33 AM
 #4

Blockexplorer.com???
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Firstbits.com/1fg4i :)


View Profile
July 05, 2011, 03:47:33 AM
 #5

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?...

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC/BCH for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
gochk
Full Member
***
Offline Offline

Activity: 133
Merit: 100


View Profile
July 05, 2011, 04:15:13 PM
 #6

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?
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 05, 2011, 04:16:59 PM
 #7

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...
joepie91
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


View Profile
July 05, 2011, 06:05:17 PM
 #8

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.

Like my post(s)? 12TSXLa5Tu6ag4PNYCwKKSiZsaSCpAjzpu Smiley
Quote from: hawks5999
I just can't wait for fall/winter. My furnace never generated money for me before. I'll keep mining until my furnace is more profitable.
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 05, 2011, 06:16:44 PM
 #9

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.
drawoc
Full Member
***
Offline Offline

Activity: 168
Merit: 100

Firstbits: 175wn


View Profile
July 05, 2011, 06:23:59 PM
 #10

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

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

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 05, 2011, 07:20:50 PM
 #11

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

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
Thanks.
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
July 05, 2011, 07:24:09 PM
 #12

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

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
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!