getStakeMinimumDelegation
https://api.triport.ioReturns the minimum number of lamports required to delegate a Solana stake account.
getStakeMinimumDelegation returns the smallest amount of stake, in lamports,
that a stake account is allowed to delegate to a validator. Delegating less than
this threshold is rejected by the runtime, so you should query it before
building a StakeProgram.delegate instruction and size the delegation at or
above the returned value.
The minimum is a cluster-wide parameter that changes only with a feature activation, so the result is effectively constant on a given cluster and is safe to cache. Use it together with the rent-exempt reserve when deciding how much to fund a new stake account: a stake account must hold at least the rent-exempt minimum plus the delegation minimum to be both rent-exempt and delegatable.
Unlike getMinimumBalanceForRentExemption, this method returns an
RpcResponseU64 object — the lamports value lives under value, wrapped in the
standard context envelope that reports the slot the result was evaluated at.
Parameters
JSON-RPC params is a positional array with a single optional element:
[config?].
configobjectoptionalconfig (CommitmentConfig)objectcommitmentstringoptionalprocessed, confirmed, or finalized.minContextSlotintegeroptionalResponse
Response fields
| Field | Type | Description |
|---|---|---|
result | object | RpcResponseU64 — context envelope plus the lamports value. |
result.context | object | Metadata about when the result was produced. |
result.context.slot | integer | Slot at which the value was evaluated. |
result.context.apiVersion | string | Node software version that served the request. |
result.value | integer | Minimum lamports required to delegate a stake account. |
Errors
Errors use the standard JSON-RPC envelope. See errors.md for the full envelope and the complete code table.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | config is malformed, or commitment is not one of processed / confirmed / finalized. |
-32003 | Rate limit exceeded | More than your tier's sol_read_rpc RPS (20 / 60 / 200 / 600); honor Retry-After. |
-32601 | Method not found | The method name is misspelled or not recognised on this chain. |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getStakeMinimumDelegation",
params: [{ commitment: "finalized" }],
}),
});
const { result } = await res.json();
console.log(`Minimum delegation: ${result.value} lamports`);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });
const { context, value } = await client.solana.getStakeMinimumDelegation({
commitment: "finalized",
});
console.log(value); // 1000000000
console.log(context.slot); // 348392041Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
resp = client.solana.get_stake_minimum_delegation(commitment="finalized")
print(resp.value) # 1000000000
print(resp.context.slot) # 348392041Notes
- The lamports value is under
result.value, not the top-levelresult— this differs from getMinimumBalanceForRentExemption, which returns a bare integer. - The minimum delegation is a cluster-wide constant that changes only on a feature activation, so it is safe to cache rather than calling on every delegation build.
- A stake account must be funded with the rent-exempt reserve in addition to the delegation minimum. Pair this with getMinimumBalanceForRentExemption to compute total funding, and with getBalance to check an existing stake account's lamports.