<p>Using <code>importaddress</code> you can sync your balance for <a href="https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/importaddress/" rel="nofollow noreferrer">watch only</a> address with rescan set to <code>true</code>:</p>

<pre>
importaddress "address" ( "label" rescan p2sh )

Adds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

Arguments:
1. "script"           (string, required) The hex-encoded script (or address)
2. "label"            (string, optional, default="") An optional label
3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions
4. p2sh                 (boolean, optional, default=false) Add the P2SH version of the script as well

Note: This call can take minutes to complete if rescan is true, during that time, other rpc calls
may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.
If you have the full public key, you should call importpubkey instead of this.

Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated
as change, and not show up in many RPCs.

Examples:

Import a script with rescan
> bitcoin-cli importaddress "myscript"

Import using a label without rescan
> bitcoin-cli importaddress "myscript" "testing" false

As a JSON-RPC call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importaddress", "params": ["myscript", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
</pre>

CC BY-SA 4.0
2018-10-16T05:08:55.870Z
you mean that i have to re importaddress again ? So i have to importaddress again every time when my watch only address balance change to sync new data ?
redondoxx
CC BY-SA 4.0
2018-10-16T07:58:12.910Z
One time only, if you need to get previous transactions/balance of watch-only address then rescan set to `true` else the future transactions/balance will auto sync for watch-only addresses. You can check with testnet
Shahbaz
CC BY-SA 4.0
2018-10-15T13:16:26.023Z
2018-10-15T13:16:26.023Z
Shahbaz
<p>After adding watch only address to my bitcoin core and perform some transaction that make my watch only address balance to 0, but when i run getbalance and listaccount with watch only is true, my watch only address still have coin. Only listunspent address show that my watch only address dont have any fund to spend more.</p>

<p>So any idea to sync my balance for watch only address ?</p>

<transactions><bitcoin-core><wallet><watch-only>
Watch only address not update balance
redondoxx
# Watch only address not update balance

(Asked by: username_0 on 2018-10-15)

After adding watch only address to my bitcoin core and perform some transaction that make my watch only address balance to 0, but when i run getbalance and listaccount with watch only is true, my watch only address still have coin. Only listunspent address show that my watch only address dont have any fund to spend more.

So any idea to sync my balance for watch only address ?

**Tags:** transactions, bitcoin-core, wallet, watch-only


---

## 1 answers

### Answer by username_1 on 2018-10-15. Score: 1

Using `importaddress` you can sync your balance for [watch only](https://bitcoincore.org/en/doc/0.16.3/rpc/wallet/importaddress/) address with rescan set to `true`:

```

importaddress "address" ( "label" rescan p2sh )

Adds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

Arguments:
1. "script"           (string, required) The hex-encoded script (or address)
2. "label"            (string, optional, default="") An optional label
3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions
4. p2sh                 (boolean, optional, default=false) Add the P2SH version of the script as well

Note: This call can take minutes to complete if rescan is true, during that time, other rpc calls
may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.
If you have the full public key, you should call importpubkey instead of this.

Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated
as change, and not show up in many RPCs.

Examples:

Import a script with rescan
> bitcoin-cli importaddress "myscript"

Import using a label without rescan
> bitcoin-cli importaddress "myscript" "testing" false

As a JSON-RPC call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importaddress", "params": ["myscript", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

```

> **Comments:**
> **username_0**: you mean that i have to re importaddress again ? So i have to importaddress again every time when my watch only address balance change to sync new data ?  
> **username_1**: One time only, if you need to get previous transactions/balance of watch-only address then rescan set to `true` else the future transactions/balance will auto sync for watch-only addresses. You can check with testnet  

---

