Skip to main content

getnodeaddresses

Overview

The 'getnodeaddresses' method allows you to retrieve information about various nodes in the Bitcoin network. The method returns a JSON array containing details such as the last seen time, services offered, address, and port of the nodes.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KE' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"getnodeaddresses","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • method: (string) The method name, in this case, "getNodeAddresses".
  • params: (array) An array of parameters. This method does not require any parameters.
  • id: (numeric) A unique identifier for the request.
  • jsonrpc: (string) The version of the JSON-RPC protocol, which should be "2.0".

Response

[
{
"time": xxx,
"services": n,
"address": "str",
"port": n
}
]