# getInflationReward

> Returns the inflation reward paid to a list of stake accounts for a given epoch.

Source: https://docs.constant-k.com/rpc/http/getinflationreward/

`getInflationReward` looks up the staking reward credited to one or more stake accounts for a specific epoch: the lamport amount paid, the post-payout balance, and the validator commission applied.

Rewards are recorded only for epochs where the account was staked and a reward was distributed; otherwise the corresponding array slot is `null`.

- Transport: HTTP, JSON-RPC 2.0 `POST` to `https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY` (New York) or `https://rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY` (Frankfurt) or `https://rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY` (Amsterdam). The key also works as an `x-api-key` header.
- Category: Staking & Inflation
- Availability: All plans
- Rate limits: Free 2/s · Operator 5/s · Blade Runner 50/s · Nexus 100/s

## Parameters

`params` is a positional JSON array, in this order:

- `addresses` (string[], required): Stake account addresses to look up, as base-58 encoded strings.
- `config` (object, optional): Optional configuration.
  - `commitment` (string, optional, one of `finalized`, `confirmed`, `processed`, default `"finalized"`): Bank state to read reward history from.
  - `epoch` (integer, optional): Epoch to query rewards for. Defaults to the previous epoch (the most recent one with a finalized reward payout).
  - `minContextSlot` (integer, optional): Minimum slot the node must have processed before answering.

## Result

- `result` ((object | null)[], optional): An array with one entry per input address, in the same order, each either a reward record or null.

## Example: Get last epoch's reward for two stake accounts

Request:

```bash
curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getInflationReward",
    "params": [
      [
        "6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu",
        "BGsqMegLpV6n6Ve146sSX2dTjUMj3M92HnU8BbNRMhF2"
      ]
    ]
  }'
```

Response:

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "epoch": 1035,
      "effectiveSlot": 447920344,
      "amount": 2032451,
      "postBalance": 2199501452451,
      "commission": 5
    },
    null
  ],
  "id": 1
}
```

## Notes

- A `null` slot does not mean the address is invalid; it usually means the account was not staked, or not yet activated, during the requested epoch.
- Older epochs cost more to query, since reward data ages out of the node's hottest cache.

