getClusterNodes
Returns information about all the nodes participating in the cluster, including their public keys, gossip addresses, TPU addresses, RPC addresses, and software versions. This is valuable for network monitoring, node discovery, debugging connectivity issues, and building dashboards that visualize the Solana network topology.
Parameters
This method does not accept any parameters.
Response
Returns an array of node objects:
| Field | Type | Description |
|---|---|---|
[].pubkey | string | Node public key (base-58) |
[].gossip | `string | null` |
[].tpu | `string | null` |
[].rpc | `string | null` |
[].version | `string | null` |
[].featureSet | `u32 | null` |
[].shredVersion | u16 | Shred version for this node |
Code Examples
cURL
curl http://88.216.36.108:7999 -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getClusterNodes",
"params": []
}'TypeScript
const response = await fetch("http://88.216.36.108:7999", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getClusterNodes",
params: []
}),
});
const { result } = await response.json();
console.log("Nodes:", result.length);Python
import requests
response = requests.post("http://88.216.36.108:7999", json={
"jsonrpc": "2.0",
"id": 1,
"method": "getClusterNodes",
"params": []
})
result = response.json()["result"]
print(f"Nodes: {len(result)}")Rust
use reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let res = client.post("http://88.216.36.108:7999")
.json(&json!({
"jsonrpc": "2.0",
"id": 1,
"method": "getClusterNodes",
"params": []
}))
.send().await?
.text().await?;
println!("{}", res);
Ok(())
}Example Response
{
"jsonrpc": "2.0",
"result": [
{
"pubkey": "9QzsJf7LPLj8GkXbYT3LFDKqE5tKVhMYAhRxMuE2Nft",
"gossip": "10.239.6.48:8001",
"tpu": "10.239.6.48:8004",
"rpc": "10.239.6.48:8899",
"version": "1.18.15",
"featureSet": 4215500110,
"shredVersion": 50093
}
],
"id": 1
}