<p>Addresses are not stored on the blockchain in the typical format (Base58 or Bech32). They are stored as ScriptPubKeys.</p>
<p>To update each address, you would have to run <code>getblock</code> and parse each output's ScriptPubKey to an address and then find the Address of each input and remove those.</p>
<p>Bitcoin does track the existence of every currently existing coin in what's called the UTXO set.</p>

CC BY-SA 4.0
2021-05-19T23:59:13.010Z
2021-05-19T23:59:13.010Z
Sachin Meier
<p>Given a new bitcoin block, I want to see:</p>
<ol>
<li>Which address have balance change.  I.E., send / receive</li>
<li>The amount of that change</li>
</ol>
<p>Is there any RPC endpoint to achieve that purpose?</p>
<p>Basically, I maintain the balance of ALL bitcoin addresses. And after each new block, I want to update the balance of the changed address.</p>

<json-rpc>
How to see the balance change from each block
FunkyBaby
# How to see the balance change from each block

(Asked by: username_0 on 2021-05-18)

Given a new bitcoin block, I want to see:

1. Which address have balance change. I.E., send / receive
2. The amount of that change

Is there any RPC endpoint to achieve that purpose?

Basically, I maintain the balance of ALL bitcoin addresses. And after each new block, I want to update the balance of the changed address.

**Tags:** json-rpc


---

## 1 answers

### Answer by username_1 on 2021-05-19. Score: 1

Addresses are not stored on the blockchain in the typical format (Base58 or Bech32). They are stored as ScriptPubKeys.

To update each address, you would have to run `getblock` and parse each output's ScriptPubKey to an address and then find the Address of each input and remove those.

Bitcoin does track the existence of every currently existing coin in what's called the UTXO set.


---

