Lightning: Command to figure out total spendable balance?

Created on 27 May 2020  路  2Comments  路  Source: ElementsProject/lightning

Besides parsing the output of listfunds, shouldn't we have a way to see how much funds we can send, and how much we can receive?

question

Most helpful comment

the summary plugin should cover this https://github.com/lightningd/plugins/tree/master/summary

All 2 comments

I think you want the spendable_msat field in the channels in listpeers:

$ lightning-cli listpeers | jq '.peers[].channels[].spendable_msat'
"2019900000msat"

It's really easy to either sum up the channels or to have a plugin do it for you and then calling the plugin to get the total.

the summary plugin should cover this https://github.com/lightningd/plugins/tree/master/summary

Was this page helpful?
0 / 5 - 0 ratings