Skip to main content

eth-v1-node-peers


/eth/v1/node/peers

Get node network peers.

Brings up information about the node's network neighbors. This retrieves all peers by default. AND conditions are used to combine multiple query parameters.

Example Request and Result for /v1/node/peers

In this section, we provide an illustrative example of a request made to retrieve details contents using the /v1/node/peers endpoint. Additionally, we present the resulting response containing information about the peers of the node.

Parameters

FieldType
statearray<string>
directionarray<string>
info

The example in this section uses a non-existing project id.

Make sure you replace it with your Ethereum Holesky Beacon endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Get node network peers.

GET https://eth-holesky-beacon.blastapi.io/<project-id>/eth/v1/node/peers

Query Parameters

NameTypeDescription
statearray<string>connecting
directionarray<string>inbound
{
"data": {
"peer_id": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
"enr": "enr:-IS4QHCYrYZbAKWCBRlAy5zzaDZXJBGkcnh4MHcBFZntXNFrdvJjX04jRzjzCBOonrkTfj499SZuOh8R33Ls8RRcy5wBgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPKY0yuDUmstAHYpMa2_oxVtw0RW_QAdpzBQA8yWM0xOIN1ZHCCdl8",
"p2p_addresses": [
"/ip4/7.7.7.7/tcp/4242/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N"
],
"discovery_addresses": [
"/ip4/7.7.7.7/udp/30303/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N"
],
"metadata": {
"seq_number": "1",
"attnets": "0x0000000000000000",
"syncnets": "0x0f"
}
}
}

Curl Request example

curl -X 'GET' \
'https://eth-holesky-beacon.blastapi.io/<project-id>/eth/v1/node/peers?state=connecting&direction=inbound' \
-H 'accept: application/json'