TriportRPC

Get latest epoch stake snapshot

GEThttps://api.triport.io/v1/sol/snapshot/stake/latest?limit=50&offset=0

Returns a summary of the current Solana epoch plus the first page of its captured stake accounts.

Solanasol_gpa_snapshotbusiness — RPS per tier (burst up to 2× sustained)

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.

limitintegeroptional
Page size. Min 1, max 1000, default 50.
offsetintegeroptional
Number of records to skip. Min 0, default 0.

Response

Response fields

FieldTypeDescription
epochobjectEpoch summary header (see below).
epoch.epochinteger (int64)Epoch number this snapshot was captured for.
epoch.record_countinteger (int64)Total stake accounts captured in this epoch.
epoch.fetched_atstring (date-time)When the snapshot was fetched (RFC 3339).
accountsarrayPage of stake accounts (see fields below).
accounts[].pubkeystringStake account address.
accounts[].voterstringVote-account of the validator this stake is delegated to.
accounts[].stakeinteger (int64)Delegated stake, in lamports.
accounts[].activation_epochinteger (int64)Epoch in which the stake activated.
accounts[].deactivation_epochinteger (int64) | nullEpoch in which the stake began deactivating, or null if still active.
totalinteger (int64)Total rows available across all pages.

Errors

CodeMeaningWhen it happens
401unauthorized / trial_expired / subscription_expiredMissing or invalid credentials, or the key's trial/subscription has lapsed.
403tier_insufficient / method_unknownThe 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.
429rate_limitedSustained 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 offset by your limit until offset >= total. limit is capped at 1000.
  • Freshness. This always reflects the latest captured epoch, which lags the live cluster by the snapshot poll interval. Use epoch.fetched_at to gauge how recent the data is, and epoch.epoch to detect when a new epoch has rolled in.
  • Related endpoints. by epoch (historical pull by epoch number, returns the same SolStakeSnapshotPage shape), 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).