Get stake account history across epochs
https://api.triport.io/v1/sol/snapshot/stake/by-pubkey/CW4tQ8Y6Ld8K2sZ9b5v3jJ7nQ9mF1xR2pA6sD4eG8hTReturns the full time-series of a single Solana stake account — its delegated voter and stake amount — as captured at every snapshot epoch.
This endpoint returns a time-series for one stake account: one entry per
snapshot epoch that the platform has captured for that pubkey. Each entry
records the vote account the stake was delegated to, the staked amount in
lamports, the activation epoch, and the deactivation epoch (or null while the
stake is still active). Use it to track how a single delegation evolved over
time — for example, to chart stake growth, detect a re-delegation to a different
validator, or find the epoch in which a stake account began deactivating.
The series is built from periodic snapshots of on-chain stake program accounts, not from live RPC, so the most recent entry reflects the latest captured epoch rather than the current slot. Older epochs are pruned according to the platform's retention window, so very old history may not be present.
To look at all stake accounts in a single epoch, use
stake/epoch/{epoch}; to list every stake
account delegated to one validator, use
stake/by-voter/{vote_pubkey}.
Parameters
Path parameters
stake_pubkeystring (base58, 32–44 chars)requiredResponse
Response fields
| Field | Type | Description |
|---|---|---|
pubkey | string | The stake account address that was queried. |
series | array | One entry per captured epoch, in epoch order. |
series[].pubkey | string | Stake account address (matches the top-level pubkey). |
series[].voter | string | Vote account the stake was delegated to in that epoch. |
series[].stake | integer (int64) | Staked amount in lamports. |
series[].activation_epoch | integer (int64) | Epoch in which the stake activated. |
series[].deactivation_epoch | integer (int64) | null | Epoch in which deactivation began, or null if the stake was still active in that snapshot. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
401 | unauthorized / trial_expired / subscription_expired | Missing, invalid, or expired credentials. |
403 | tier_insufficient / method_unknown | API key's tier is below business, or it lacks the sol_gpa_snapshot scope. |
429 | rate_limited | Sustained RPS for the business tier exceeded; honor the Retry-After header. |
All error responses share the standard envelope (error, message,
request_id). See the shared Errors page for the full schema
and the per-status fields (e.g. required_tier on 403, retry_after_sec on
429).
Examples
JavaScript (fetch)
const stakePubkey = "CW4tQ8Y6Ld8K2sZ9b5v3jJ7nQ9mF1xR2pA6sD4eG8hT";
const res = await fetch(
`https://api.triport.io/v1/sol/snapshot/stake/by-pubkey/${stakePubkey}`,
{ headers: { Authorization: `Bearer ${process.env.TRIPORT_API_KEY}` } }
);
if (!res.ok) throw new Error(`Triport error ${res.status}`);
const { series } = await res.json();
for (const s of series) {
console.log(`voter=${s.voter} stake=${s.stake} lamports (epoch ${s.activation_epoch})`);
}TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });
const { pubkey, series } = await client.sol.snapshot.stakeByPubkey(
"CW4tQ8Y6Ld8K2sZ9b5v3jJ7nQ9mF1xR2pA6sD4eG8hT"
);
console.log(`${pubkey}: ${series.length} epochs captured`);Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
result = client.sol.snapshot.stake_by_pubkey(
"CW4tQ8Y6Ld8K2sZ9b5v3jJ7nQ9mF1xR2pA6sD4eG8hT"
)
for entry in result["series"]:
print(entry["activation_epoch"], entry["voter"], entry["stake"])Notes
- Lamports, not SOL.
stakeis in lamports (1 SOL = 1,000,000,000 lamports). Divide by1e9for a human-readable SOL value. - Snapshot-based, bounded history. Entries exist only for epochs the platform
captured and still retains; there is no entry for the live, in-progress slot.
An empty
seriesmeans the pubkey was never seen in a retained snapshot. - Detecting re-delegation. If
voterchanges between consecutive entries, the stake was re-delegated to a different validator in that epoch. - Related endpoints:
snapshot/account/{address}for raw account state,stake/latestfor the newest epoch page,stake/epoch/{epoch}for a specific epoch, andstake/by-voter/{vote_pubkey}for all stakes on a validator.