Get stake snapshot for a specific epoch
https://api.triport.io/v1/sol/snapshot/stake/epoch/612Returns the captured stake-account snapshot for a single, historical Solana epoch.
This endpoint returns the stake-account snapshot that Triport captured for one
historical Solana epoch. Each snapshot is an index of the stake accounts observed
for that epoch — their delegation target, delegated amount, and activation /
deactivation epochs — served as an offset-paginated page (SolStakeSnapshotPage).
Use it to reconstruct the stake distribution at a known point in time: attribute
rewards, audit delegation, or chart how stake moved between vote accounts across
epochs, without scanning the chain yourself. Because a snapshot is tied to one
epoch, you pass the epoch number directly in the path and page through the
accounts array with limit and offset.
Snapshots are retained for a rolling window of recent epochs. Requesting an epoch
that was never captured (too old, in the future, or otherwise absent) returns
404 — distinct from a 200 whose accounts array is empty, which means the
epoch was captured but you have paged past its last row.
Parameters
Path parameters
epochint64 (≥ 0)requiredQuery parametersobjectlimitintegeroptional1000; values above 10000 are capped to 10000.offsetintegeroptional0. Combine with limit to walk the full snapshot.Response
200 OK — a SolStakeSnapshotPage for the requested epoch.
epochobjectepoch.epochintegerepoch.record_countintegerepoch.fetched_atstring (date-time)accountsarrayaccounts[].pubkeystringaccounts[].voterstringaccounts[].stakeintegeraccounts[].activation_epochintegeraccounts[].deactivation_epochinteger | nullnull when the stake is not deactivating.totalintegerErrors
| Code | Meaning | When it happens |
|---|---|---|
401 | Unauthorized | Missing or invalid Authorization: Bearer API key. |
403 | Forbidden | The key lacks the sol_gpa_snapshot scope or is below the Business tier. |
404 | Not Found | No snapshot was captured for the requested epoch. |
429 | Too Many Requests | The tier's request-rate limit was exceeded; retry after backing off. |
A malformed (non-integer) epoch is rejected as a client error before the
snapshot is looked up. All errors use the shared error envelope — see
Errors for the full body shape and handling guidance.
Examples
JavaScript (fetch)
const epoch = 612;
const params = new URLSearchParams({ limit: "1000", offset: "0" });
const res = await fetch(
`https://api.triport.io/v1/sol/snapshot/stake/epoch/${epoch}?${params}`,
{
headers: {
Authorization: `Bearer ${process.env.TRIPORT_API_KEY}`,
},
}
);
if (res.status === 404) {
throw new Error(`No stake snapshot captured for epoch ${epoch}`);
}
if (!res.ok) {
throw new Error(`Request failed: ${res.status}`);
}
const page = await res.json();
console.log(`epoch ${page.epoch.epoch}: ${page.accounts.length} of ${page.total} accounts`);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const page = await triport.sol.snapshot.stakeByEpoch(612, {
limit: 1000,
offset: 0,
});
for (const acct of page.accounts) {
console.log(acct.pubkey, acct.voter, acct.stake);
}Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
page = client.sol.snapshot.stake_by_epoch(612, limit=1000, offset=0)
for acct in page.accounts:
print(acct.pubkey, acct.voter, acct.stake)Notes
- Pagination. Offset-based: start at
offset=0and addlimiteach call until you have readtotalrows. The default page size is1000and the maximum is10000— largerlimitvalues are silently capped. A200with an emptyaccountsarray means you have paged past the end;404means the epoch itself was never captured. - Snapshot availability. Only epochs within the retained window are queryable;
very old or future epochs return
404. - Related endpoints. This is one of the snapshot tag's stake-index queries.
See also the latest-epoch snapshot (
snapshot-stake-latest), the per-validator timeline (/v1/sol/snapshot/stake/by-voter/{vote_pubkey}), and the single-account history (/v1/sol/snapshot/stake/by-pubkey/{stake_pubkey}). - Authentication & limits. See Authentication for key setup and Rate limits for the Business-tier RPS budget.