network_info - NEAR Protocol

Returns the node's current network connections: active peers, known producers, and sent/received data counts.

Method

network_info

Parameters

This method takes an empty params array [].

Example

bashexport NEAR_RPC=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl -X POST "${NEAR_RPC}" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": "getblock.io", "method": "network_info", "params": []}'

Response

json{
    "active_peers": [
        {
            "id": "ed25519:...",
            "addr": "1.2.3.4:24567"
        }
    ],
    "num_active_peers": 24,
    "peer_max_count": 40,
    "sent_bytes_per_sec": 12345,
    "received_bytes_per_sec": 23456,
    "known_producers": []
}

Response Fields

FieldTypeDescription
active_peersarrayCurrently connected peers
num_active_peersnumberNumber of active peers
peer_max_countnumberMaximum peer connections
known_producersarrayKnown block producers

Use Cases

  • Connectivity: Confirm the node has healthy peering
  • Diagnostics: Inspect peer counts and throughput

Error Handling

ErrorMessageDescription
-32700 / Parse errorParse errorThe JSON request was malformed
-32601 / Method not foundMethod not foundThe method is unknown or disabled on this node version
HANDLER_ERRORRequested data not foundThe account, block, chunk, or transaction does not exist or is garbage-collected (use an archival node)
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect