Bespoke
net_peerCount
Summary: Get number of peers
This request returns the number of peers currently connected to the client. Warning: Since Infura methods may be supported by different Ethereum clients, the result can't be considered a global status. It only reflects the number of peers currently connected to the specific client handling this request.
Parameters
This method doesn't accept any parameters.
Returns
net_peerCountResponse
stringThe number of connected peers in hexadecimal.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
Customize request
Parameter
Value
RequestCURL
CURL
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x64"
}