Get latest epoch stake snapshot
https://api.triport.io/v1/sol/snapshot/stake/latest?limit=50&offset=0Returns a summary of the current Solana epoch plus the first page of its captured stake accounts.
This endpoint serves a pre-built snapshot of Solana stake accounts for the most recently captured epoch. Triport maintains a background snapshot cache of large program-account (gPA) queries, so a single request returns a paginated slice of the stake set without you having to issue an expensive on-chain scan yourself.
The response is a SolStakeSnapshotPage: an epoch summary header (epoch number,
total record count, and when the snapshot was fetched) followed by one page of
stake accounts. Use limit and offset to walk the full set, and read
epoch.record_count (or total) to know how many pages exist.
Use this when you want the freshest available stake distribution. To pull a specific historical epoch instead, see snapshot stake by epoch. To filter by validator vote-account or follow a single stake account over time, see by voter and by pubkey.
Parameters
All parameters are query-string parameters; there are no path params or request body.
limitintegeroptional1, max 1000, default 50.offsetintegeroptional0, default 0.Response
Response fields
| Field | Type | Description |
|---|---|---|
epoch | object | Epoch summary header (see below). |
epoch.epoch | integer (int64) | Epoch number this snapshot was captured for. |
epoch.record_count | integer (int64) | Total stake accounts captured in this epoch. |
epoch.fetched_at | string (date-time) | When the snapshot was fetched (RFC 3339). |
accounts | array | Page of stake accounts (see fields below). |
accounts[].pubkey | string | Stake account address. |
accounts[].voter | string | Vote-account of the validator this stake is delegated to. |
accounts[].stake | integer (int64) | Delegated stake, in lamports. |
accounts[].activation_epoch | integer (int64) | Epoch in which the stake activated. |
accounts[].deactivation_epoch | integer (int64) | null | Epoch in which the stake began deactivating, or null if still active. |
total | integer (int64) | Total rows available across all pages. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
401 | unauthorized / trial_expired / subscription_expired | Missing or invalid credentials, or the key's trial/subscription has lapsed. |
403 | tier_insufficient / method_unknown | The key lacks the sol_gpa_snapshot scope or is below the business tier. The response includes current_tier / required_tier and an X-Required-Tier header. |
429 | rate_limited | Sustained RPS for your tier exceeded. Honor the Retry-After and X-RateLimit-* headers before retrying. |
See errors for the full error envelope and per-code fields.
Examples
JavaScript (fetch)
const params = new URLSearchParams({ limit: "50", offset: "0" });
const res = await fetch(
`https://api.triport.io/v1/sol/snapshot/stake/latest?${params}`,
{
headers: {
Authorization: `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
}
);
if (!res.ok) throw new Error(`Triport ${res.status}: ${await res.text()}`);
const page = await res.json();
console.log(`epoch ${page.epoch.epoch}: ${page.total} stake accounts`);
console.log(page.accounts);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });
const page = await client.solana.snapshot.stakeLatest({ limit: 50, offset: 0 });
console.log(page.epoch.epoch, page.epoch.recordCount);
for (const acct of page.accounts) {
console.log(acct.pubkey, acct.stake, acct.voter);
}Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
page = client.solana.snapshot.stake_latest(limit=50, offset=0)
print(page["epoch"]["epoch"], page["epoch"]["record_count"])
for acct in page["accounts"]:
print(acct["pubkey"], acct["stake"], acct["voter"])Notes
- Pagination. Walk the full epoch by incrementing
offsetby yourlimituntiloffset >= total.limitis capped at1000. - Freshness. This always reflects the latest captured epoch, which lags the
live cluster by the snapshot poll interval. Use
epoch.fetched_atto gauge how recent the data is, andepoch.epochto detect when a new epoch has rolled in. - Related endpoints. by epoch (historical
pull by epoch number, returns the same
SolStakeSnapshotPageshape), by voter (stake delegated to one vote-account), by pubkey (one stake account's history across captured epochs), and account snapshot (raw account state for any address).