TriportRPC

getClusterNodes

POSThttps://api.triport.io/v1/sol

Returns information about all the nodes participating in the Solana cluster.

Solanasol_read_rpcfree+ — 20 / 60 / 200 / 600 RPS (free / basic / pro / business)

getClusterNodes returns an array describing every node the queried validator is currently aware of in the gossip network. Each entry exposes the node's identity public key and the network addresses it advertises for gossip, RPC, and transaction-processing (TPU) traffic, along with its software version and feature/shred versions.

Use this method to discover the topology of the cluster — for example, to find RPC endpoints, to map validator identities to their advertised addresses, or to audit which software versions are active across the network.

Contact-info fields are populated from what each node chooses to advertise over gossip. A node that has not shared a particular endpoint (or whose RPC is not publicly exposed) will report null for that field, so consumers must treat every address field as optional.

Parameters

This method takes no parameters. JSON-RPC params is an empty array ([]).

optional
No parameters.

Response

Response fields

result is an array of ClusterNode objects.

FieldTypeDescription
pubkeystring (base-58)Node identity public key.
gossipstring | nullGossip network address (host:port), or null if not advertised.
rpcstring | nullJSON-RPC address (host:port), or null if the node does not expose RPC.
tpustring | nullTransaction-processing unit (TPU) address (host:port), or null if not advertised.
versionstring | nullSoftware version of the node, or null if version info is unavailable.
featureSetinteger | nullUnique identifier of the node's feature set, or null if unavailable.
shredVersioninteger | nullShred version the node has been configured to use.

Errors

Errors are returned in the standard JSON-RPC error envelope. See the shared errors reference for the full envelope shape and shared codes.

CodeMeaningWhen it happens
401UnauthorizedMissing or invalid Authorization: Bearer key.
429Rate limitedMore than your tier's RPS for sol_read_rpc (20 / 60 / 200 / 600).

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/sol", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getClusterNodes",
    params: [],
  }),
});


const { result } = await res.json();
const rpcNodes = result.filter((node) => node.rpc !== null);
console.log(`${result.length} nodes total, ${rpcNodes.length} expose RPC`);

TypeScript SDK (@triport/sdk)

import { TriportClient } from "@triport/sdk";


const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY });


const nodes = await client.solana.getClusterNodes();


for (const node of nodes) {
  console.log(`${node.pubkey}${node.rpc ?? "no RPC"} (v${node.version ?? "?"})`);
}

Python (triport-sdk)

import os
from triport import TriportClient


client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])


nodes = client.solana.get_cluster_nodes()


for node in nodes:
    rpc = node.get("rpc") or "no RPC"
    print(f"{node['pubkey']}{rpc} (v{node.get('version') or '?'})")

Notes

  • Null contact info: any of gossip, rpc, tpu, version, and featureSet may be null when a node has not advertised that detail over gossip. Always guard against null before using an address.
  • RPC discovery: filter the array on rpc !== null to find nodes that expose a JSON-RPC endpoint.
  • Network identity: shredVersion and featureSet together indicate which fork/feature configuration a node is running — useful for spotting nodes that are out of sync with the rest of the cluster.
  • Related methods: pair with getSlot and getBlockProduction to correlate node topology with cluster progress.