Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to figure out total spendable balance? #3750

Closed
thestick613 opened this issue May 26, 2020 · 2 comments
Closed

Command to figure out total spendable balance? #3750

thestick613 opened this issue May 26, 2020 · 2 comments
Assignees
Labels

Comments

@thestick613
Copy link
Contributor

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?

@cdecker
Copy link
Member

cdecker commented May 27, 2020

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.

@cdecker cdecker self-assigned this May 27, 2020
@niftynei
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants