Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

lightning-listnodes - Command to get the list of nodes in the known network.

listnodes [id]

The listnodes command returns nodes the node has learned about via gossip messages, or a single one if the node id was specified.

  "id": 82,
  "method": "listnodes",
  "params": {
    "id": "02e29856dab8ddd9044c18486e4cab79ec717b490447af2d4831e290e48d57638a"

On success, an object containing nodes is returned. It is an array of objects, where each object contains:

nodeid (pubkey): the public key of the node
last_timestamp (u32, optional): A node_announcement has been received for this node (UNIX timestamp)

If last_timestamp is present:

alias (string): The fun alias this node advertized (up to 32 characters)
color (hex): The favorite RGB color this node advertized (always 6 characters)
features (hex): BOLT #9 features bitmap this node advertized

addresses (array of objects): The addresses this node advertized:

type (string): Type of connection (one of "ipv4", "ipv6", "torv2", "torv3", "websocket")
port (u16): port number

If type is "ipv4", "ipv6", "torv2" or "torv3":

address (string): address in expected format for type

If option_will_fund is present:

option_will_fund (object):
lease_fee_base_msat (msat): the fixed fee for a lease (whole number of satoshis)
lease_fee_basis (u32): the proportional fee in basis points (parts per 10,000) for a lease
funding_weight (u32): the onchain weight you'll have to pay for a lease
channel_fee_max_base_msat (msat): the maximum base routing fee this node will charge during the lease
channel_fee_max_proportional_thousandths (u32): the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)
compact_lease (hex): the lease as represented in the node_announcement

On failure, one of the following error codes may be returned:

-32602: Error in given parameters.

   "nodes": [
         "nodeid": "02e29856dab8ddd9044c14586e4cab79ec717b490447af2d4831e290e48d58638a",
         "alias": "some_alias",
         "color": "68f442",
         "last_timestamp": 1597213741,
         "features": "02a2a1",
         "addresses": [
               "type": "ipv4",
               "address": "zzz.yy.xx.xx",
               "port": 9735

Vincenzo Palazzo <> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command.


Main web site:

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.