network_info - NEAR Protocol
Returns the node's current network connections: active peers, known producers, and sent/received data counts.
Method
network_infoParameters
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
| Field | Type | Description |
|---|---|---|
| active_peers | array | Currently connected peers |
| num_active_peers | number | Number of active peers |
| peer_max_count | number | Maximum peer connections |
| known_producers | array | Known block producers |
Use Cases
- Connectivity: Confirm the node has healthy peering
- Diagnostics: Inspect peer counts and throughput
Error Handling
| Error | Message | Description |
|---|---|---|
| -32700 / Parse error | Parse error | The JSON request was malformed |
| -32601 / Method not found | Method not found | The method is unknown or disabled on this node version |
| HANDLER_ERROR | Requested data not found | The account, block, chunk, or transaction does not exist or is garbage-collected (use an archival node) |
| 403 / RBAC: access denied | Access denied | The GetBlock access token is missing or incorrect |