getInflationReward
Returns the inflation / staking reward for a list of addresses for an epoch

Parameters

  • <array of base-58 encoded strings> - An array of addresses to query
  • <object> - (optional) Config object:
    • commitment: <object> - (optional) Configures the commitment level of the blocks queried Accepts one of the following strings: ["finalized", "confirmed", "processed"] For more info, refer to this doc.
    • epoch: <u64> - (optional) An epoch for which the reward occurs. If omitted, the previous epoch will be used
    • minContextSlot: <number> - (optional) set the minimum slot that the request can be evaluated at

Results

  • epoch: <u64>, epoch for which reward occured
  • effectiveSlot: <u64>, the slot in which the rewards are effective
  • amount: <u64>, reward amount in lamports
  • postBalance: <u64>, post balance of the account in lamports
  • commission: <u8|undefined> - vote account commission when the reward was credited

Example

Request

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

Response

1
{
2
"jsonrpc": "2.0",
3
"result": [],
4
"id": "1"
5
}
Copied!