getInflationReward

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

📘

Supported on Solana (mainnet) only.

Parameters

  • <array> - An array of addresses to query, as base-58 encoded strings
  • (optional) <object> - Configuration object containing the following fields:
    • (optional) commitment: <string> - Commitment
    • (optional) epoch: <u64> - An epoch for which the reward occurs. If omitted, the previous epoch will be used
    • (optional) minContextSlot: <number> - set the minimum slot that the request can be evaluated at.

Returns

The result field will be a JSON array with the following fields:

  • 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

API Endpoint

The format of an Solana API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/solana/

Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/solana/

Example

Request

curl https://open-platform.nodereal.io/{{apiKey}}/solana/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getInflationReward",
    "params": [
       ["6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu", "BGsqMegLpV6n6Ve146sSX2dTjUMj3M92HnU8BbNRMhF2"], {"epoch": 2}
    ]
  }
'

Result

{
  "jsonrpc": "2.0",
  "result": [
    {
      "amount": 2500,
      "effectiveSlot": 224,
      "epoch": 2,
      "postBalance": 499999442500
    },
    null
  ],
  "id": 1
}