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 occurred
  • 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 --location --request POST 'https://solana-mainnet.g.alchemy.com/v2/demo/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "method": "getInflationReward",
    "jsonrpc": "2.0",
    "params": [
        [],
        {
            "commitment": "confirmed"
        }
    ],
    "id": "1"
}'

Response


{
    "jsonrpc": "2.0",
    "result": [],
    "id": "1"
}
Language
URL
ReadMe