2

I expected to find an option on lncli to get the exact inbound and outbound capacity of my node, but this is not the case. What is the best way to have this information?

1

lncli listchannels will tell you the local balance and remote balance of each channel (in satoshis).

You could simply sum up the the balances of all your channels to find the total outgoing capacity (local balance) and incoming capacity (remote balance) you have. Here is a one-liner that reports the sum of your inbound capacity (requires jq):

lncli listchannels | jq -r '.channels[].remote_balance' | awk '{sum+=$1} END {print sum}'

lncli channelbalancewill give you the total outgoing capacity you have, but until AMP is commonplace, it may be more useful to know the capacity of your largest channel alone.

  • Can you suggest a one-liner to do so? – alec_djinn Jun 24 at 11:34
  • I suppose the remote balance is the inbound, am I correct? – alec_djinn Jun 24 at 16:33
  • Yes, remote_balance is inbound, local_balance is outbound. Note that a channel must reserve a small balance for channel closing fees, so you might not always be able to spend the entire reported balance. Here is a one-liner to find inbound capacity (requires jq): lncli listchannels | jq -r '.channels[].remote_balance' | awk '{sum+=$1} END {print sum}' – chytrik Jun 25 at 3:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.