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

system_health

Description

Returns the current health status of an Astar node, including peer connectivity and synchronization state. Useful for infrastructure monitoring and alerting.

Parameters

This method does not require any parameters.

Returns

FieldTypeDescription
peersnumberConnected peer count
isSyncingbooleanIndicates whether the node is catching up
shouldHavePeersbooleanFalse only for isolated development nodes

Request Example

{
"jsonrpc": "2.0",
"method": "system_health",
"params": [],
"id": 1
}

Response Example

Captured 2025-10-03 from https://rpc.astar.network

{
"jsonrpc": "2.0",
"result": {
"peers": 37,
"isSyncing": false,
"shouldHavePeers": true
},
"id": 1
}

Code Examples

cURL

curl https://api-astar.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "system_health",
"params": [],
"id": 1
}'

JavaScript (fetch)

async function checkNodeHealth() {
const response = await fetch('https://api-astar.n.dwellir.com/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'system_health',
params: [],
id: 1
})
});

const { result } = await response.json();
return {
peers: result.peers,
status: result.isSyncing ? 'syncing' : 'ready'
};
}

Python (requests)

import requests
import json

payload = {
"jsonrpc": "2.0",
"method": "system_health",
"params": [],
"id": 1
}

resp = requests.post(
"https://api-astar.n.dwellir.com/YOUR_API_KEY",
headers={"Content-Type": "application/json"},
data=json.dumps(payload),
timeout=10
)
health = resp.json()["result"]
print("Peers:", health["peers"], "Syncing:", health["isSyncing"])