⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

net_peerCount

Returns number of peers currently connected to the client on Avalanche C-Chain.

Parameters

This method accepts no parameters.

{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 74
}

Returns

QUANTITY - integer of the number of connected peers.

Implementation Example

curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 74
}'

Response Example

{
"id": 74,
"jsonrpc": "2.0",
"result": "0x2"
}

Note: The number of peers indicates the node's connectivity to the Avalanche network.


Need help? Contact our support team or check the Avalanche documentation.