getRecentPerformanceSamples
Last updated:
getRecentPerformanceSamples returns a list of recent performance samples taken
across the cluster. Each sample summarizes the number of transactions and slots
that occurred over a fixed samplePeriodSecs window (typically 60 seconds), and
is taken roughly once per sample period.
This is the canonical way to estimate recent throughput — transactions per
second (TPS) and non-vote TPS — without polling individual slots. Divide a
sample's numTransactions (or numNonVoteTransactions) by samplePeriodSecs
to get the average TPS for that window.
Samples are returned newest-first, ordered by slot descending. Use the
optional limit parameter to request fewer than the maximum number of samples.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | No |
Returns
| Field | Type |
|---|---|
| result | array |
Examples
curl https://triport.io/sol \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"id":1,"method":"getRecentPerformanceSamples","params":["<limit>"],"jsonrpc":"2.0"}'const res = await fetch("https://triport.io/sol", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"id": 1,
"method": "getRecentPerformanceSamples",
"params": [
"<limit>"
],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/sol",
headers={"Authorization": "Bearer <api-key>"},
json={"id":1,"method":"getRecentPerformanceSamples","params":["<limit>"],"jsonrpc":"2.0"},
)
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet, devnet, testnet.
- Credit cost: 1 per call.
FAQ
- What does getRecentPerformanceSamples do?
- Returns a list of recent cluster performance samples, in reverse slot order.
- How many credits does getRecentPerformanceSamples cost?
- getRecentPerformanceSamples costs 1 credit(s) per call on Triport by default.
- Is getRecentPerformanceSamples available over WebSocket?
- getRecentPerformanceSamples is an HTTP JSON-RPC method.