> For the complete documentation index, see [llms.txt](https://docs.triton.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.triton.one/solana/rpc-methods/utility-methods/getinflationreward.md).

# getInflationReward

Returns the staking or voting reward (epoch, effectiveSlot, amount, postBalance, commission) for each address in an epoch, or null.

## Request

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

```bash
curl "https://<your-endpoint>.mainnet.rpcpool.com/<your-token>" -s -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationReward",
  "params": [
    [
      "<vote-account-pubkey>",
      "<stake-account-pubkey>"
    ],
    {
      "epoch": 1074,
      "commitment": "finalized"
    }
  ]
}'
```

{% endtab %}

{% tab title="Kit" %}

```typescript
import { address, createSolanaRpc } from "@solana/kit";

const rpc_url = "https://<your-endpoint>.mainnet.rpcpool.com/<your-token>";
const rpc = createSolanaRpc(rpc_url);

let addresses = [
  address("<vote-account-pubkey>"),
  address("<stake-account-pubkey>")
];

let epoch = BigInt(1074);

let inflationReward = await rpc.getInflationReward(addresses, { epoch }).send();

console.log(inflationReward);
```

{% endtab %}

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

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

const connection = new Connection("https://<your-endpoint>.mainnet.rpcpool.com/<your-token>", "confirmed");

let addresses = [
  new PublicKey("<vote-account-pubkey>"),
  new PublicKey("<stake-account-pubkey>")
];

let epoch = 1074;

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

console.log(inflationReward);
```

{% endtab %}

{% tab title="Rust" %}

```rust
// Cargo.toml: anyhow = "1", solana-client = "~4.4", solana-commitment-config = "3",
// solana-sdk = "5", tokio = { version = "1", features = ["full"] }. solana-client 4.4 takes
// solana-sdk 5.x types. Requires Rust 1.98.1 or newer (solana-client 4.4).
use anyhow::Result;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_commitment_config::CommitmentConfig;
use solana_sdk::pubkey::Pubkey;

#[tokio::main]
async fn main() -> Result<()> {
    let client = RpcClient::new_with_commitment(
        String::from("https://<your-endpoint>.mainnet.rpcpool.com/<your-token>"),
        CommitmentConfig::confirmed(),
    );

    let addresses = [
        "<vote-account-pubkey>".parse::<Pubkey>()?,
        "<stake-account-pubkey>".parse::<Pubkey>()?,
    ];

    let epoch = 1074;

    let inflation_reward = client.get_inflation_reward(&addresses, Some(epoch)).await?;

    println!("{:#?}", inflation_reward);

    Ok(())
}
```

{% endtab %}
{% endtabs %}

## Parameters

**`addresses`** · array · required

An array of addresses to query, as base-58 encoded strings. Up to 100 addresses per request on shared mainnet endpoints. A request with more fails with error `-32602`. Dedicated nodes may differ.

**`config`** · object · optional

Configuration object containing the following fields:

**`commitment`** · string · default `finalized`

Values: `confirmed`, `finalized`

Solana RPC uses the following commitment levels:

| Value       | Description                                                                                                                                                                        |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `processed` | Return data from the highest slot this node has processed on the fork it currently considers best. This is the newest view, but it can still change if the cluster switches forks. |
| `confirmed` | Return data from the highest slot the cluster has finalized. On Alpenglow, `confirmed` and `finalized` are the same level.                                                         |
| `finalized` | Return data from the highest slot that the cluster has finalized. On Alpenglow there are no vote towers or lockouts: a slot is finalized by certificates of aggregated votes.      |

This method does not accept `processed`.

**`epoch`** · u64

An epoch for which the reward occurs. If omitted, the previous epoch will be used

**`minContextSlot`** · number

The minimum slot that the request can be evaluated at

## Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "epoch": 1074,
      "effectiveSlot": 464400000,
      "amount": 173904896564,
      "postBalance": 198124657764,
      "commission": null
    },
    null
  ],
  "id": 1
}
```

## Result

The result field will be a JSON array whose elements are either reward objects or `null` when no reward data is available for the corresponding input address:

**`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 | null

Vote account commission when the reward was credited

**`commissionBps`** · u16 · optional

Vote account commission in basis points when the reward was credited. The field is omitted when the reward record does not carry it.

***

*Adapted from the* [*Solana `getInflationReward` reference*](https://solana.com/docs/rpc/http/getinflationreward)*, maintained by the Solana Foundation.*

***

<i class="fa-life-ring">:life-ring:</i> Contact support by clicking the chat icon in your [customer dashboard](https://customers.triton.one)\ <i class="fa-briefcase">:briefcase:</i> Sales questions? [Contact us](https://triton.one/contact)\ <i class="fa-sparkles">:sparkles:</i> AI agent? Read [llms.txt](https://docs.triton.one/llms.txt)\ <i class="fa-rss">:rss:</i> Follow updates: [Blog](https://blog.triton.one) · [X](https://x.com/triton_one) · [YouTube](https://www.youtube.com/@triton_one_ltd) · [Telegram](https://t.me/tritonone) · [GitHub](https://github.com/rpcpool)
