getRecentPerformanceSamples
Returns a list of recent performance samples, in reverse slot order. Performance samples are taken every 60 seconds and include the number of transactions and slots that occur in a given time window.

Parameters

  • limit: <usize> - (optional) number of samples to return (maximum 720)

Returns

  • <array of RpcPerfSample objejcts>
    • slot: <u64> - Slot in which sample was taken at
    • numTransactions: <u64> - Number of transactions in sample
    • numSlots: <u64> - Number of slots in sample
    • samplePeriodSecs: <u16> - Number of seconds in a sample window

Example

Request

cURL
1
curl --location --request POST 'https://solana-mainnet.g.alchemy.com/v2/demo/' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jsonrpc": "2.0",
5
"id": 1,
6
"method": "getRecentPerformanceSamples",
7
"params": [
8
4
9
]
10
}'
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": [
4
{
5
"numSlots": 80,
6
"numTransactions": 79434,
7
"samplePeriodSecs": 60,
8
"slot": 136084954
9
},
10
{
11
"numSlots": 78,
12
"numTransactions": 68080,
13
"samplePeriodSecs": 60,
14
"slot": 136084874
15
},
16
{
17
"numSlots": 75,
18
"numTransactions": 83223,
19
"samplePeriodSecs": 60,
20
"slot": 136084796
21
},
22
{
23
"numSlots": 82,
24
"numTransactions": 87759,
25
"samplePeriodSecs": 60,
26
"slot": 136084721
27
}
28
],
29
"id": 1
30
}
Copied!