Bitcoin Forum
May 13, 2024, 02:43:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Get balance of an address using bitcoind  (Read 3690 times)
flatfly (OP)
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
September 08, 2012, 09:14:21 AM
 #1

Is there some magic bitcoind RPC call to show the balance of *any* address (not especially one of yours)?
I HATE TABLES I HATE TABLES I HA(╯°□°)╯︵ ┻━┻ TABLES I HATE TABLES I HATE TABLES
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715568233
Hero Member
*
Offline Offline

Posts: 1715568233

View Profile Personal Message (Offline)

Ignore
1715568233
Reply with quote  #2

1715568233
Report to moderator
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 08, 2012, 10:33:14 AM
 #2

Not using the existing client, however, it may be worth checking into the details of the new RPC commands (certainly I think they at least let you access any tx).

If needing to get the balance in code you could always issue a "system" command that makes a "curl" call such as the following:

Code:
curl http://blockchain.info/q/addressbalance/1ciyam3htJit1feGa26p2wQ4aw6KFTejU

(note that the balance returned is in Satoshis)

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
dirtycat
Sr. Member
****
Offline Offline

Activity: 456
Merit: 250



View Profile
September 29, 2012, 01:44:29 PM
 #3

Is there some magic bitcoind RPC call to show the balance of *any* address (not especially one of yours)?

this would be very useful to have in bitcoind!  along with showing tx info on any tx.

it would make it so we dont have to rely on sites like blockchain and blockexplorer to get that info

we already have that data locally why not utilize it.

poop!
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
September 29, 2012, 03:05:21 PM
 #4

This requires an index (from addresses to all transactions that affect it) which isn't necessary for normal operation.

It's currently not implemented, but adding it wouldn't be that hard. It's not a priority, though.

I do Bitcoin stuff.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 29, 2012, 03:12:37 PM
 #5

This requires an index (from addresses to all transactions that affect it) which isn't necessary for normal operation.

It's currently not implemented, but adding it wouldn't be that hard. It's not a priority, though.

I think I would really like to use such a feature rather than relying on a 3rd party service such as blockchain.info (not that I don't trust them but basically because why should I waste the bandwidth when I already have the blockchain?).

I would be willing to put up 10 BTC towards this if that can motivate someone not already flat out to build this (payment would be made to the owner of the accepted pull request that achieves this).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
flatfly (OP)
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
September 29, 2012, 03:24:06 PM
 #6

This requires an index (from addresses to all transactions that affect it) which isn't necessary for normal operation.

It's currently not implemented, but adding it wouldn't be that hard. It's not a priority, though.

I think I would really like to use such a feature rather than relying on a 3rd party service such as blockchain.info (not that I don't trust them but basically because why should I waste the bandwidth when I already have the blockchain?).

I would be willing to put up 10 BTC towards this if that can motivate someone not already flat out to build this (payment would be made to the owner of the accepted pull request that achieves this).


Would you be interested in a command-line tool that would be able to get this info from any Electrum server? This is something I feel I would be able to deliver rather quickly.

And if you install an Electrum server on your own bitcoind installation, it would make the whole solution local. After all, an Electrum server is just an add-on to bitcoind that makes it easy to query through the Stratum/JSON protocol.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 29, 2012, 03:29:41 PM
 #7

Would you be interested in a command-line tool that would be able to get this info from any Electrum server? This is something I feel I would be able to deliver rather quickly.

And if you install an Electrum server on your own bitcoind installation, it would make the whole solution local. After all, an Electrum server is just an add-on to bitcoind that makes it easy to query through the Stratum/JSON protocol.

That might be something I could look into although I'm not sure that I'd want to run another server just for the one function (but maybe there are some other cool things it does that might convince me to give it a try?).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
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!