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
}
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.
count
(optional): The number of addresses to return. Specifying 0 will return all known addresses.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.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.
A list of known network peer addresses.
The response is of type object
.
Was this page helpful?