<p>You can use the <code>getbalances</code> command. It will return all of the balances belonging to the wallet, including ones the wallet can sign for, watch only things, trusted (confirmed transactions and unconfirmed change), and immature coinbase outputs.</p>

<p>Here is the help output for it.</p>

<pre><code>getbalances
Returns an object with all balances in BTC.

Result:
{
    "mine": {                        (object) balances from outputs that the wallet can sign
      "trusted": xxx                 (numeric) trusted balance (outputs created by the wallet or confirmed outputs)
      "untrusted_pending": xxx       (numeric) untrusted pending balance (outputs created by others that are in the mempool)
      "immature": xxx                (numeric) balance from immature coinbase outputs
      "used": xxx                    (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating)
    },
    "watchonly": {                   (object) watchonly balances (not present if wallet does not watch anything)
      "trusted": xxx                 (numeric) trusted balance (outputs created by the wallet or confirmed outputs)
      "untrusted_pending": xxx       (numeric) untrusted pending balance (outputs created by others that are in the mempool)
      "immature": xxx                (numeric) balance from immature coinbase outputs
    },
}
</code></pre>

CC BY-SA 4.0
2019-07-16T18:50:02.967Z
`getbalances` not longer works: **via rpc** `JSONRPCError ({"code"=>-32601, "message"=>"Method not found"})` **via bitcoin-cli** `Method not found`
Nicos Karalis
CC BY-SA 4.0
2019-07-16T19:09:16.137Z
Forgot to mention, I'm using `Bitcoin Core Daemon version v0.18.0.0-g2472733a24a9364e4c6233ccd04166a26a68cc65`
Nicos Karalis
CC BY-SA 4.0
2019-07-16T19:59:02.870Z
`getbalances` in new in master; it isn't in any released version yet.
Pieter Wuille
CC BY-SA 4.0
2019-07-16T18:45:51.260Z
2019-07-16T18:45:51.260Z
Ava Chow
<p>Using <code>bitcoin-cli listunspent</code> also works, then you can parse each utxo and you will see the unconfirmed ones.</p>

CC BY-SA 4.0
2020-09-07T01:14:25.863Z
2020-09-07T01:14:25.863Z
Fontaine
<p>We have a bitcoin core client running on a production machine. This machine cannot have the private key so each address is added as <em>watch only</em>.</p>

<p>So far it has worked perfectly, but recently we need to display the btc amount that is waiting confirmation and the amount that is confirmed (at least 1 confirmation)</p>

<pre><code>bitcoin-rpc getbalance * 0 true
bitcoin-rpc getunconfirmedbalance
</code></pre>

<p>these are the two methods that I've found online that should work, but they are not working.</p>

<p><code>getbalance</code> returns only the confirmed amount and <code>getunconfirmedbalance</code> returns always 0</p>

<p>How can I get the unconfirmed balance on a watch only wallet?</p>

<bitcoin-core><json-rpc>
RPC call to get unconfirmed balance on a watch only wallet
Nicos Karalis
# RPC call to get unconfirmed balance on a watch only wallet

(Asked by: username_0 on 2019-07-16)

We have a bitcoin core client running on a production machine. This machine cannot have the private key so each address is added as *watch only*.

So far it has worked perfectly, but recently we need to display the btc amount that is waiting confirmation and the amount that is confirmed (at least 1 confirmation)

```
bitcoin-rpc getbalance * 0 true
bitcoin-rpc getunconfirmedbalance

```

these are the two methods that I've found online that should work, but they are not working.

`getbalance` returns only the confirmed amount and `getunconfirmedbalance` returns always 0

How can I get the unconfirmed balance on a watch only wallet?

**Tags:** bitcoin-core, json-rpc


---

## 2 answers

### Answer by username_1 on 2019-07-16. Score: 1

You can use the `getbalances` command. It will return all of the balances belonging to the wallet, including ones the wallet can sign for, watch only things, trusted (confirmed transactions and unconfirmed change), and immature coinbase outputs.

Here is the help output for it.

```
getbalances
Returns an object with all balances in BTC.

Result:
{
    "mine": {                        (object) balances from outputs that the wallet can sign
      "trusted": xxx                 (numeric) trusted balance (outputs created by the wallet or confirmed outputs)
      "untrusted_pending": xxx       (numeric) untrusted pending balance (outputs created by others that are in the mempool)
      "immature": xxx                (numeric) balance from immature coinbase outputs
      "used": xxx                    (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating)
    },
    "watchonly": {                   (object) watchonly balances (not present if wallet does not watch anything)
      "trusted": xxx                 (numeric) trusted balance (outputs created by the wallet or confirmed outputs)
      "untrusted_pending": xxx       (numeric) untrusted pending balance (outputs created by others that are in the mempool)
      "immature": xxx                (numeric) balance from immature coinbase outputs
    },
}

```

> **Comments:**
> **username_0**: `getbalances` not longer works: **via rpc** `JSONRPCError ({"code"=>-32601, "message"=>"Method not found"})` **via bitcoin-cli** `Method not found`  
> **username_0**: Forgot to mention, I'm using `Bitcoin Core Daemon version v0.18.0.0-g2472733a24a9364e4c6233ccd04166a26a68cc65`  
> **username_2**: `getbalances` in new in master; it isn't in any released version yet.  

---

### Answer by username_3 on 2020-09-07. Score: 0

Using `bitcoin-cli listunspent` also works, then you can parse each utxo and you will see the unconfirmed ones.


---

