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://<your-endpoint>/ \
-X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"getRecentPerformanceSamples","params":["<limit>"]}'const res = await fetch("https://<your-endpoint>/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"id": 1,
"method": "getRecentPerformanceSamples",
"params": [
"<limit>"
],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post("https://<your-endpoint>/", 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.