getnodeaddresses JSON-RPC command
getnodeaddresses ( count )
Return known addresses, which can potentially be used to find new nodes on the network.
Arguments
1. count (numeric, optional, default=1) The maximum number of addresses to return. Specify 0 to return all known addresses.
Result
[
{
"time": ttt, (numeric) Timestamp in seconds since epoch (Jan 1 1970 GMT) keeping track of when the node was last seen
"services": n, (numeric) The services offered by the node
"servicesnames":[ (array) The services offered, in human-readable form
"SERVICE_NAME" (string) The service name if it is recognized
,...
],
"address": "host", (string) The address of the node
"port": n, (numeric) The port number of the node
"network": "name" (string) The network (ipv4, ipv6, onion) the node connected through
}
,....
]
Examples
> bitcoin-cli getnodeaddresses 8
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnodeaddresses", "params": [8] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
Bitcoin Cash Node Daemon version v29.0.1-d35fdab
Documentation on docs.bitcoincashnode.org reflects the current master branch in Git, and may include API changes that are not yet present in the latest release.