getInflationRate
https://api.triport.io/v1/solReturns the annualized inflation rates (total, validator, and foundation) for the current epoch on the Solana cluster.
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: []).
——optionalResponse
Response fields
| Field | Type | Description |
|---|---|---|
result | object | InflationRate object. |
result.total | number | Total inflation rate, as an annualized fraction. |
result.validator | number | Inflation allocated to validators, as an annualized fraction. |
result.foundation | number | Inflation allocated to the foundation, as an annualized fraction. |
result.epoch | integer | Epoch 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.
| Code | Meaning | When it happens |
|---|---|---|
401 | Unauthorized | Missing, invalid, or revoked Authorization: Bearer key. |
-32003 | Rate limited | More 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 error | Transient 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.0846→8.46%). - Epoch-scoped. The returned
epochidentifies which epoch the values apply to. Cache against this value and refresh when the cluster advances to a new epoch — pair withgetEpochInfoto track the boundary. foundationmay be0. As foundation inflation tapers over time it can reach zero, in which casetotalequalsvalidator.- Related methods:
getInflationGovernorfor the governing parameters andgetInflationRewardfor per-account staking rewards.