0

I want to know if it is possible to see all nodes, their capacity and channels (of the whole Lightning network)? I am doing some network research and I really have a hard time finding this information, I would love some guidance.

I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?

In Voltage I cannot write commands like lightning-cli listchannels and lightning-cli listnodes, or with lnd it should be only one API call describechannelgraph.

2
  • Is it possible that your last half sentence is incomplete? If not, it sounds like you already found out how to achieve your goal, but you are trying in a different way anyway. Could you clarify what the connection to LND is here?
    – Murch
    Commented Aug 12 at 13:11
  • Hey Murch, the last sentence is incomplete since I do not fully understand how to do it. I will need to install Go and follow the manual from voltage, but maybe someone can help instead of me trying to use Go, since I am not the best coder. I will use the data to make a network analysis of LN.
    – Degenomics
    Commented Aug 13 at 11:37

2 Answers 2

0

I want to know if it is possible to see all nodes, their capacity and channels (In the whole Lightning network)?

Below 2 websites provide capacity and channels in the whole lightning network.

I thought by installing a Lightning Node I would be able to get this data by command line? Is this possible via Voltage?

Yes, Voltage provides a guide to command with lncli via RPC call.

1
  • Thank you so much. I have looked at lightning Terminal, but it only shows Good peers and not all channel data for the node. It shows the node, the capacity and good peers. It will take a lot of time to look up all the individual nodes for the channel data. I will need to look into Go, but maybe someone can make a data dump, since I am not the best coder.
    – Degenomics
    Commented Aug 13 at 11:33
-1

Alright, so if you want to export the Lightning Network graph, it’s actually pretty doable. If you’re using lnd, you can grab the whole network graph by running the describegraph command. Just type in lncli describegraph, and boom—you get a JSON file with all the nodes and channels. You can save that file and do whatever you need with it.

If you’re on c-lightning, it’s a bit different. You’ll need to use the listchannels and listnodes commands to get the data. You can save each of those as JSON files too, like lightning-cli listchannels > channels.json for the channels, and the same for nodes.

After you’ve got the data, you can use something like Python’s NetworkX to visualize it, or you can just pop it into one of the Lightning Network explorers if you want a quick look.

It’s pretty simple once you know the commands. Let me know if you need any more help!

1
  • Thx, Nice one! Is there anyway someone with a ln node, could upload the json file, so I could download it and take a look.
    – Degenomics
    Commented Sep 9 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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