Solana
Solana
Solana
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
getRecentPerformanceSamples returns a series of recent performance snapshots from Solana, the high-throughput Proof-of-Stake chain whose native token is SOL. Each sample covers a fixed time window (roughly 60 seconds) and reports the slot it ended at, numTransactions, numSlots, samplePeriodSecs, and numNonVoteTransactions. Because Solana runs at very high throughput, these samples are the standard way to derive live transactions-per-second and watch how busy the network is without scanning individual blocks. The optional limit caps how many samples come back (up to 720, the most recent first). Call it against https://solana.therpc.io/YOUR_API_KEY as a JSON-RPC 2.0 POST.
numTransactions by samplePeriodSecs for each sample.numNonVoteTransactions, which strips out the consensus votes that dominate raw counts.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | limit | integer | 否 | Number of samples to return (≤720). |
| 类型 | 描述 |
|---|---|
| array | Array of { slot, numTransactions, numSlots, samplePeriodSecs, numNonVoteTransactions }. |
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
samplePeriodSecs to get a per-second rate rather than treating the raw count as TPS.numTransactions includes Solana's consensus vote transactions, which make up a large share of activity. For user-facing throughput use numNonVoteTransactions instead.