TriportRPC

getInflationRate

POSThttps://api.triport.io/v1/sol

Returns the annualized inflation rates (total, validator, and foundation) for the current epoch on the Solana cluster.

Solanasol_read_rpcfree+ — 20 / 60 / 200 / 600 RPS (free / basic / pro / business)

getInflationRate returns the specific inflation values for the current epoch: a total rate plus the split between the portion paid to validators and the portion paid to the foundation. All three are annualized rates expressed as fractions — 0.0846 means an 8.46% annualized rate, not 0.0846%.

Use it to display current network inflation, estimate staking yield, or feed reward calculations. The values are epoch-scoped: the returned epoch field tells you which epoch they apply to, so clients that cache the result should re-fetch when the cluster advances to a new epoch.

This method takes no parameters and is inexpensive — it is a standard read method available on every tier. For the parameters that govern how these rates change over time, see getInflationGovernor; for per-account staking rewards, see getInflationReward.

Parameters

This method takes no parameters. Send an empty positional array (params: []).

optional
This method accepts no parameters.

Response

Response fields

FieldTypeDescription
resultobjectInflationRate object.
result.totalnumberTotal inflation rate, as an annualized fraction.
result.validatornumberInflation allocated to validators, as an annualized fraction.
result.foundationnumberInflation allocated to the foundation, as an annualized fraction.
result.epochintegerEpoch for which these inflation values are valid.

Errors

Errors are returned in the standard JSON-RPC error envelope. See the shared errors reference for the full envelope shape and shared codes.

CodeMeaningWhen it happens
401UnauthorizedMissing, invalid, or revoked Authorization: Bearer key.
-32003Rate limitedMore than your tier's RPS for sol_read_rpc (20 / 60 / 200 / 600). Returned with HTTP 429 and a Retry-After header.
internal_error (500)Internal errorTransient upstream fault while fetching inflation data; safe to retry with backoff.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/sol", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getInflationRate",
    params: [],
  }),
});


const { result } = await res.json();
console.log(`Epoch ${result.epoch}: ${(result.total * 100).toFixed(2)}% total inflation`);

TypeScript SDK (@triport/sdk)

import { TriportClient } from "@triport/sdk";


const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY });


const rate = await client.solana.getInflationRate();
console.log(`Epoch ${rate.epoch}: validator ${(rate.validator * 100).toFixed(2)}%`);

Python (triport-sdk)

import os
from triport import TriportClient


client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])


rate = client.solana.get_inflation_rate()
print(f"Epoch {rate['epoch']}: validator {rate['validator'] * 100:.2f}%")

Notes

  • Annualized fractions. All three rates are fractions, not percentages. Multiply by 100 to display a percent (e.g. 0.08468.46%).
  • Epoch-scoped. The returned epoch identifies which epoch the values apply to. Cache against this value and refresh when the cluster advances to a new epoch — pair with getEpochInfo to track the boundary.
  • foundation may be 0. As foundation inflation tapers over time it can reach zero, in which case total equals validator.
  • Related methods: getInflationGovernor for the governing parameters and getInflationReward for per-account staking rewards.