---
title: getInflationRate
description: >-
  Returns the current epoch's effective inflation rates.
url: /docs/rpc/http/getinflationrate
type: reference
hideTableOfContents: true
---

Returns the current epoch's effective inflation rates.

<Callout type="info" title="Source">
  [`get_inflation_rate`](https://github.com/anza-xyz/agave/blob/v3.1.8/rpc/src/rpc.rs#L897)
</Callout>

<APIMethod>

```jsonc !!request curl
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationRate"
}
```

```ts !!request title="Kit"
import { createSolanaRpc } from "@solana/kit";

const rpc_url = "https://api.devnet.solana.com";
const rpc = createSolanaRpc(rpc_url);

let inflationRate = await rpc.getInflationRate().send();

console.log(inflationRate);
```

```ts !!request title="web3.js"
import { Connection, clusterApiUrl } from "@solana/web3.js";

const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

let inflationRate = await connection.getInflationRate();

console.log(inflationRate);
```

```rs !!request title="Rust"
use anyhow::Result;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_commitment_config::CommitmentConfig;

#[tokio::main]
async fn main() -> Result<()> {
    let client = RpcClient::new_with_commitment(
        String::from("https://api.devnet.solana.com"),
        CommitmentConfig::confirmed(),
    );

    let inflation_rate = client.get_inflation_rate().await?;

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

    Ok(())
}
```

### !params

### !!result

```jsonc !response
{
  "jsonrpc": "2.0",
  // !hover(1:6) result
  "result": {
    // !hover total
    "total": 0.149,
    // !hover validator
    "validator": 0.148,
    // !hover foundation
    "foundation": 0.001,
    // !hover epoch
    "epoch": 100
  },
  "id": 1
}
```

!type object

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

##### !! total

!type f64

Total inflation

##### !! validator

!type f64

Inflation allocated to validators

##### !! foundation

!type f64

Inflation allocated to the foundation

##### !! epoch

!type u64

Epoch for which these values are valid

</APIMethod>
