# getInflationReward

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

#### Parameters required for this RPC call

* An array of addresses to query, as base-58 encoded strings
* **configuration** : This contains the following parameters, all are optional fields.
  * **commitment**: The commitment describes how finalized a block is at that point in time. <mark style="color:yellow;">processed</mark>, <mark style="color:yellow;">confirmed</mark> and <mark style="color:yellow;">finalized</mark> are supported.
  * **epoch**: An epoch for which the reward occurs. If omitted, the previous epoch will be used
  * **minContextSlot**: The minimum slot that the request can be evaluated at. This is a number.

{% tabs %}
{% tab title="cURL" %}

<pre class="language-bash"><code class="lang-bash">curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
<strong>  POST -H "Content-Type: application/json" -d ' 
</strong>   {
     "jsonrpc": "2.0",
     "id": 1,
     "method": "getInflationReward",
     "params": [
       [
         "6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu",
         "BGsqMegLpV6n6Ve146sSX2dTjUMj3M92HnU8BbNRMhF2"
       ],
       {
         "epoch": 800,
         "commitment": "finalized"
       }
     ]
   }
 '
</code></pre>

{% endtab %}

{% tab title="Web3.js" %}

```javascript
import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";

const connection = new Connection("https://rpc.shyft.to?api_key=YOUR-API-KEY", "confirmed");

let addresses = [
  new PublicKey("6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu"),
  new PublicKey("BGsqMegLpV6n6Ve146sSX2dTjUMj3M92HnU8BbNRMhF2"),
];

let epoch = 2;

let inflationReward = await connection.getInflationReward(addresses, epoch);

console.log(inflationReward);
```

{% endtab %}

{% tab title="Response" %}

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

{% endtab %}
{% endtabs %}
