<p>If you have <a href="https://stedolan.github.io/jq/" rel="nofollow noreferrer"><code>jq</code></a> installed, you can ask it to sum up all the values for you. For example, to get the total amount stored in your node’s UTXOs:</p>
<pre><code>lightning-cli listfunds | jq '[.outputs[].value] | add'
</code></pre>
<p>If you want your output in BTC rather than satoshis, you can divide it right away:</p>
<pre><code>lightning-cli listfunds | jq '[.outputs[].value] | add / 100000000'
</code></pre>

CC BY-SA 4.0
2021-07-08T01:40:05.070Z
2021-07-13T18:42:17.503Z
2021-07-13T18:42:17.503Z
kirelagin
<p>Use the <a href="https://github.com/ElementsProject/lightning/blob/master/doc/lightning-listfunds.7.txt" rel="nofollow noreferrer">RPC-Interface listfunds</a> <code>lightning-cli listfunds</code> which lists all payment channels and UTXO. </p>

<p>If you wish to have a more nicely display you can use this small tool: <a href="https://github.com/renepickhardt/lightning-helpers" rel="nofollow noreferrer">https://github.com/renepickhardt/lightning-helpers</a></p>

<pre><code>git clone https://github.com/renepickhardt/lightning-helpers.git

cd lightning-helpers
sudo make install
listfunds
</code></pre>

<p>it aggregates everything so that you can see your total funds. Also you can add a parameter to change the unit of display. </p>

<p>If you don't trust a third party tool and don't want to read the source code you can use this little shell script: </p>

<p>utxo values: </p>

<p><code>lightning-cli listfunds | grep "value" | sed 's/      "value": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'</code></p>

<p>total channel balance on your side: </p>

<p><code>lightning-cli listfunds | grep "channel_sat" | sed 's/      "channel_sat": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'</code></p>

CC BY-SA 4.0
2018-10-04T10:57:16.060Z
2018-11-02T19:10:33.003Z
2018-11-02T19:10:33.003Z
Rene Pickhardt
<p>I am running a c-lightning node and want to know how many btc I am owning on this wallet and how many I can spend. <code>lightning-cli listchannels</code> does not help. What do I need to do? </p>

<lightning-network><core-lightning>
How can I see how many Bitcoins my c-lightning network node has?
Rene Pickhardt
# How can I see how many Bitcoins my c-lightning network node has?

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

I am running a c-lightning node and want to know how many btc I am owning on this wallet and how many I can spend. `lightning-cli listchannels` does not help. What do I need to do?

**Tags:** lightning-network, core-lightning


---

## 2 answers

### Answer by username_0 on 2018-10-04. Score: 5 | Accepted answer

Use the [RPC-Interface listfunds](https://github.com/ElementsProject/lightning/blob/master/doc/lightning-listfunds.7.txt) `lightning-cli listfunds` which lists all payment channels and UTXO.

If you wish to have a more nicely display you can use this small tool: <https://github.com/username_0/lightning-helpers>

```
git clone https://github.com/username_0/lightning-helpers.git

cd lightning-helpers
sudo make install
listfunds

```

it aggregates everything so that you can see your total funds. Also you can add a parameter to change the unit of display.

If you don't trust a third party tool and don't want to read the source code you can use this little shell script:

utxo values:

`lightning-cli listfunds | grep "value" | sed 's/ "value": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'`

total channel balance on your side:

`lightning-cli listfunds | grep "channel_sat" | sed 's/ "channel_sat": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'`


---

### Answer by username_1 on 2021-07-08. Score: 1

If you have [`jq`](https://stedolan.github.io/jq/) installed, you can ask it to sum up all the values for you. For example, to get the total amount stored in your node’s UTXOs:

```
lightning-cli listfunds | jq '[.outputs[].value] | add'

```

If you want your output in BTC rather than satoshis, you can divide it right away:

```
lightning-cli listfunds | jq '[.outputs[].value] | add / 100000000'

```


---

