TriportRPC

Get stake snapshot for a specific epoch

GEThttps://api.triport.io/v1/sol/snapshot/stake/epoch/612

Returns the captured stake-account snapshot for a single, historical Solana epoch.

Solanasol_gpa_snapshotBusiness tier — RPS-per-tier with burst (see [Rate limits](../../rate-limits.md))

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)required
The Solana epoch number to read the snapshot for. Must be a non-negative integer.
Query parametersobject
limitintegeroptional
Maximum number of stake-account rows to return. Defaults to 1000; values above 10000 are capped to 10000.
offsetintegeroptional
Number of rows to skip before collecting this page; defaults to 0. Combine with limit to walk the full snapshot.

Response

200 OK — a SolStakeSnapshotPage for the requested epoch.

epochobject
Summary header for the snapshot's epoch.
epoch.epochinteger
The epoch number this snapshot belongs to (echoes the path parameter).
epoch.record_countinteger
Total number of stake-account rows captured for the epoch.
epoch.fetched_atstring (date-time)
When this epoch's snapshot was captured.
accountsarray
The stake-account rows in this page.
accounts[].pubkeystring
Base-58 address of the stake account.
accounts[].voterstring
Base-58 address of the vote account (validator identity) the stake is delegated to.
accounts[].stakeinteger
Delegated stake, in lamports.
accounts[].activation_epochinteger
Epoch in which the delegation activated.
accounts[].deactivation_epochinteger | null
Epoch in which the delegation deactivates; null when the stake is not deactivating.
totalinteger
Total number of stake-account rows in the snapshot, across all pages.

Errors

CodeMeaningWhen it happens
401UnauthorizedMissing or invalid Authorization: Bearer API key.
403ForbiddenThe key lacks the sol_gpa_snapshot scope or is below the Business tier.
404Not FoundNo snapshot was captured for the requested epoch.
429Too Many RequestsThe 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=0 and add limit each call until you have read total rows. The default page size is 1000 and the maximum is 10000 — larger limit values are silently capped. A 200 with an empty accounts array means you have paged past the end; 404 means 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.