Learn getInflationReward use cases, code examples, request parameters, response structure, and tips.
getInflationReward
RPC method allows you to query the inflation rewards (commonly known as staking rewards) that were credited to one or more addresses for a specific epoch.
This is useful for verifying rewards received by stake accounts or any account that might have received inflation rewards.
addresses
(array of strings): A list of base-58 encoded public keys for the accounts you want to query. The maximum number of addresses allowed may vary depending on the RPC provider (e.g., Helius allows up to 1005 for paid plans).config
(object, optional): A configuration object with the following optional fields:
commitment
(string, optional): Specifies the commitment level. Defaults to finalized
if not provided.epoch
(integer, optional): The epoch number for which to fetch the rewards. If omitted, the RPC node will typically use the most recently completed epoch for which rewards have been distributed.minContextSlot
(integer, optional): The minimum slot that the request can be evaluated at. This ensures the query is made against a ledger state that has processed up to at least this slot.result
field of the JSON-RPC response will be an array corresponding to the input addresses
array. Each element in the result array will either be:
null
if the address did not receive an inflation reward for that epoch or if the account did not exist.epoch
(u64): The epoch for which this reward was credited.effectiveSlot
(u64): The slot in which the reward was applied and became effective.amount
(u64): The amount of the reward, in lamports.postBalance
(u64): The balance of the account, in lamports, after the reward was credited.commission
(u8 | undefined): For vote accounts, this is the commission percentage (0-100) taken by the validator at the time the reward was credited. It will be undefined
for non-vote accounts.effectiveSlot
indicates when this happens.null
result for an address means no reward was found for that address in the specified epoch. This could be because the account wasn’t eligible (e.g., not a sufficiently staked stake account), the reward was zero, or the account didn’t exist at that time.getInflationReward
method to accurately retrieve and verify staking rewards on the Solana network.