<p>All Bitcoin transactions are publicly available. This is fundamentally why Bitcoin can work as a truly decentralized currency. Bitcoin is different from the traditional banking system specifically because anybody can see and validate everyone's transactions. If only a few could access the information about people's balance, then it wouldn't be fully decentralized, it would be just like traditional banking.</p>

<p>So yes, you can calculate the balance of <em>any</em> Bitcoin address in the network.</p>

CC BY-SA 3.0
2014-08-27T12:13:28.933Z
Yes you can calculate the balance of an address, but you can't really know that it belongs to that user. Even if you require a signed message, you don't know if it's the user or if they asked for/paid for someone else to sign the message for them.
Tim S.
CC BY-SA 3.0
2014-08-27T12:31:02.347Z
We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user. –       
So basically if i have got this correct this would mean that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?
Abhishek
CC BY-SA 3.0
2014-08-27T12:48:46.000Z
@Abhishek exactly.
Luca Matteis
CC BY-SA 3.0
2014-08-27T16:28:48.103Z
okay thanks. 
just one last question, will the same logic be applicable to deterministic wallets with multiple public addressees too?
Abhishek
CC BY-SA 3.0
2014-08-27T11:50:42.113Z
2014-08-27T11:50:42.113Z
Luca Matteis
<p>The service provider can know the balance of the wallet, if the wallet is "hosted" one.</p>

<p>The service provider must know all the addresses associated with the wallet (this is pretty much the definition of a Bitcoin wallet in the first place). However, you do not need to know private keys needed to send out Bitcoins from the wallet, you can have "read-only" knowledge about the wallet.</p>

<p>However from your service it sounds like you are already using hosted wallets, so finding out the balance of the wallet should be just summing up unspent balance on the public addresses of the user wallet.</p>

CC BY-SA 3.0
2014-08-27T12:29:35.167Z
We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user. –       
So basically if i have got this correct this would mean that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?
Abhishek
CC BY-SA 3.0
2014-08-27T11:45:49.697Z
2014-08-27T11:45:49.697Z
Mikko Ohtamaa
<p>I think there is some general confusion as to what a wallet is, and how you interface with one. I'll try to be detailed but not too nitty-gritty.</p>

<p>A wallet is really two connected things. First it is a collection of private/public keypairs. In the case of standard addresses (P2PKH) each public/private keypair matches to 2 distinct Bitcoin addresses. This is because you can derive two addresses from the keypair because there is a compressed and uncompressed representation.</p>

<p>In the case of multi-signature the address is constructed based on all of the public keys involved in the transaction. This can create many addresses that represent the same keypairs or combinations thereof.</p>

<p>Based on the comment above you want to run a site that does 2ofN multisignature. Which means you control one of the keys at least, this means that your wallet is a collection of addresses that you have partial control of. At any time you can sum the balance of every address you mutually control with the user and come up with a total balance. </p>

<p>So, the answer is yes, you can contact the user when the balance falls below a certain amount since you have total knowledge of all keys that the user is using since you are  party to them. This lets you compute based on the public ledgers information. This is also true for HD wallets / Keys so long as you compute a collection of multisig addresses derived from the HD keys.</p>

CC BY-SA 3.0
2014-11-27T16:54:25.047Z
2014-11-27T16:54:25.047Z
Matt
<p>Say for example I run an ecommerce website which mandates users to have a minimum balance of 1 bitcoin in their wallets to access the platform. In the event the balance in his wallet falls below 1 bitcoin he should not be able to access the platform and he should see a message on his screen saying <em>"Please load to minimum balance"</em>. </p>

<p>So, the question is, can I, or the Bitcoin wallet provider I use, read the bitcoin balance of the users so as to fulfil the above business requirement? </p>

CC BY-SA 3.0
2014-08-27T12:12:17.327Z
Are you hosting the wallets for them, so that only you have control of the private keys? If not, this requirement is impossible.
Tim S.
CC BY-SA 3.0
2014-08-27T12:24:48.660Z
We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user.
Abhishek
CC BY-SA 3.0
2014-08-27T12:27:49.870Z
So basically if i have got this correct this would meaan that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?
Abhishek
<wallet><balance><ecommerce>
Can the service providing the bitcoin wallet know how much value has the user loaded into his wallet?
Abhishek
# Can the service providing the bitcoin wallet know how much value has the user loaded into his wallet?

(Asked by: username_0 on 2014-08-27)

Say for example I run an ecommerce website which mandates users to have a minimum balance of 1 bitcoin in their wallets to access the platform. In the event the balance in his wallet falls below 1 bitcoin he should not be able to access the platform and he should see a message on his screen saying *"Please load to minimum balance"*.

So, the question is, can I, or the Bitcoin wallet provider I use, read the bitcoin balance of the users so as to fulfil the above business requirement?

**Tags:** wallet, balance, ecommerce

> **Comments:**
> **username_1**: Are you hosting the wallets for them, so that only you have control of the private keys? If not, this requirement is impossible.  
> **username_0**: We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user.  
> **username_0**: So basically if i have got this correct this would meaan that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?  

---

## 3 answers

### Answer by username_2 on 2014-08-27. Score: 2

All Bitcoin transactions are publicly available. This is fundamentally why Bitcoin can work as a truly decentralized currency. Bitcoin is different from the traditional banking system specifically because anybody can see and validate everyone's transactions. If only a few could access the information about people's balance, then it wouldn't be fully decentralized, it would be just like traditional banking.

So yes, you can calculate the balance of *any* Bitcoin address in the network.

> **Comments:**
> **username_1**: Yes you can calculate the balance of an address, but you can't really know that it belongs to that user. Even if you require a signed message, you don't know if it's the user or if they asked for/paid for someone else to sign the message for them.  
> **username_0**: We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user. –        So basically if i have got this correct this would mean that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?  
> **username_2**: @username_0 exactly.  
> **username_0**: okay thanks.  just one last question, will the same logic be applicable to deterministic wallets with multiple public addressees too?  

---

### Answer by username_3 on 2014-08-27. Score: 0

The service provider can know the balance of the wallet, if the wallet is "hosted" one.

The service provider must know all the addresses associated with the wallet (this is pretty much the definition of a Bitcoin wallet in the first place). However, you do not need to know private keys needed to send out Bitcoins from the wallet, you can have "read-only" knowledge about the wallet.

However from your service it sounds like you are already using hosted wallets, so finding out the balance of the wallet should be just summing up unspent balance on the public addresses of the user wallet.

> **Comments:**
> **username_0**: We are planning to host multisig wallets where we will have only one of the private keys but the overall control on the wallet will be completely in the hands of the user. –        So basically if i have got this correct this would mean that I can write a script which calculates the unspent balance on a particular public address (associated with a user in the system) and at any given time if it goes below a particular predefined value, then it sends out a message to the owner of that address to take corrective action?  

---

### Answer by username_4 on 2014-11-27. Score: 0

I think there is some general confusion as to what a wallet is, and how you interface with one. I'll try to be detailed but not too nitty-gritty.

A wallet is really two connected things. First it is a collection of private/public keypairs. In the case of standard addresses (P2PKH) each public/private keypair matches to 2 distinct Bitcoin addresses. This is because you can derive two addresses from the keypair because there is a compressed and uncompressed representation.

In the case of multi-signature the address is constructed based on all of the public keys involved in the transaction. This can create many addresses that represent the same keypairs or combinations thereof.

Based on the comment above you want to run a site that does 2ofN multisignature. Which means you control one of the keys at least, this means that your wallet is a collection of addresses that you have partial control of. At any time you can sum the balance of every address you mutually control with the user and come up with a total balance.

So, the answer is yes, you can contact the user when the balance falls below a certain amount since you have total knowledge of all keys that the user is using since you are party to them. This lets you compute based on the public ledgers information. This is also true for HD wallets / Keys so long as you compute a collection of multisig addresses derived from the HD keys.


---

