Author

Topic: Getting Address Balance On BlockExplorer/BlockChain (Read 2536 times)

hero member
Activity: 672
Merit: 500
BitLotto - best odds + best payouts + cheat-proof
What exactly do you need to do? Just know how much BTC was sent to it? q/getreceivedbyaddress works great.
legendary
Activity: 2940
Merit: 1333
Why does it say that it is a bad idea?

If you send 10 BTC to a new address that I generate, then I send 1 BTC back to you, block explorer will show a balance of 0 BTC on my address, not 9 BTC like you might expect.

The other 9 BTC will have been sent as 'change' to a new address in my wallet.
legendary
Activity: 1072
Merit: 1181
Because addresses do not correspond exactly to wallets: if you do not know how change addresses work, these numbers will give you a wrong impression.
legendary
Activity: 1304
Merit: 1015
I want to get the balance of a bitcoin address but the description of the web call on blockexplorer says this:

Quote
addressbalance - shows received BTC minus sent BTC for an address. Do not use this unless you know what you are doing: it does not do what you might expect.

This is the same as subtracting /q/getsentbyaddress from /q/getreceivedbyaddress.
Using this data is almost always a very bad idea, as the amount of BTC sent
by an address is usually very different from the amount of BTC sent by the
person owning the address.
/q/addressbalance/address

Why does it say that it is a bad idea?
Jump to: