TriportRPC

getHealth

POSThttps://triport.io/rpc/stellar

Returns node health through Stellar Soroban JSON-RPC.

Stellar mainnetstellar:rpcstellar_read_rpc — 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured)

Reports node health plus its newest ledger, oldest retained ledger, and configured retention window.

Use it for readiness checks and to choose a valid starting ledger for history methods. getLatestLedger instead focuses on ledger header data.

Both measured Soroban nodes reported a 120,960-ledger window; boundaries remain properties of the selected node.

Parameters

JSON-RPC params is a by-name object. Send an empty object ({}); this method defines no parameters.

optional
No method parameters.

Response

The response is copied unchanged from the accepted fixture.

resultobject
Method result object.
result.latestLedgernumber
Most recent known ledger sequence
result.latestLedgerCloseTimestring
The unix timestamp (as a string) of the close time of the most recent known ledger
result.ledgerRetentionWindownumber
Maximum retention window configured. A full window state can be determined via: ledgerRetentionWindow = latestLedger - oldestLedger + 1
result.oldestLedgernumber
Oldest ledger sequence kept in history
result.oldestLedgerCloseTimestring
The unix timestamp (as a string) of the close time of the oldest ledger kept in history
result.statusstring
"healthy"

Errors

Errors use the standard JSON-RPC envelope. See Stellar errors and the shared error reference.

CodeMeaningWhen it happens
-32602Invalid paramsthe by-name object or a field has the wrong type; positional-array style params are rejected.
-32601Method not foundThe method is absent from the published Stellar OpenRPC catalog.
401UnauthorizedThe API key is missing or invalid.
429Rate limitedThe stellar_read_rpc RPS budget is exceeded.

Examples

JavaScript (fetch)

const request = {
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getHealth",
  "params": {}
};
const response = await fetch("https://triport.io/rpc/stellar", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(request),
});
const payload = await response.json();
if (!response.ok || payload.error) throw new Error(JSON.stringify(payload.error));
console.log(payload.result);

Notes

  • The inclusive window is latestLedger - oldestLedger + 1.
  • Healthy does not imply archive access beyond oldestLedger.
  • Related: getLatestLedger, getEvents, and getTransactions.
  • This is a read-only surface. No write or transaction-submission method is published.