POST
/
788f110831fe13808302bd79796d55e8
curl --request POST \
  --url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "1.0",
  "method": "getnodeaddresses",
  "params": [
    0
  ],
  "id": 1
}'
{
  "result": [
    {
      "address": "<string>",
      "port": 123,
      "services": "<string>",
      "time": 123
    }
  ],
  "error": {},
  "id": 123
}

The getnodeaddresses method retrieves known addresses of network peers. This can be particularly useful for new nodes looking to find peers to connect to for initial blockchain synchronization.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • count (optional): The number of addresses to return. Specifying 0 will return all known addresses.

Response

  • result — an array of objects, each representing a known peer address. Each object includes the address, port, services offered by the peer, and the last time the address was seen.
  • error — an object containing an error message if an error occurred, otherwise null.
  • id — an integer representing the ID of the request.

Use case

The getnodeaddresses method is useful for bootstrapping or maintaining a healthy list of peers, ensuring a node has multiple avenues for connecting and synchronizing with the network.

Body

application/json
jsonrpc
string
default:1.0
method
string
default:getnodeaddresses
params
integer[]

The number of addresses to return. If 0 is specified, the node will return all known addresses.

id
integer
default:1

Response

200 - application/json
A list of known network peer addresses.
result
object[]
error
object
id
integer