TriportRPC

Get stake account history across epochs

GEThttps://api.triport.io/v1/sol/snapshot/stake/by-pubkey/CW4tQ8Y6Ld8K2sZ9b5v3jJ7nQ9mF1xR2pA6sD4eG8hT

Returns the full time-series of a single Solana stake account — its delegated voter and stake amount — as captured at every snapshot epoch.

Solanasol_gpa_snapshotbusiness

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)required
The stake account address whose history you want.

Response

Response fields

FieldTypeDescription
pubkeystringThe stake account address that was queried.
seriesarrayOne entry per captured epoch, in epoch order.
series[].pubkeystringStake account address (matches the top-level pubkey).
series[].voterstringVote account the stake was delegated to in that epoch.
series[].stakeinteger (int64)Staked amount in lamports.
series[].activation_epochinteger (int64)Epoch in which the stake activated.
series[].deactivation_epochinteger (int64) | nullEpoch in which deactivation began, or null if the stake was still active in that snapshot.

Errors

CodeMeaningWhen it happens
401unauthorized / trial_expired / subscription_expiredMissing, invalid, or expired credentials.
403tier_insufficient / method_unknownAPI key's tier is below business, or it lacks the sol_gpa_snapshot scope.
429rate_limitedSustained 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. stake is in lamports (1 SOL = 1,000,000,000 lamports). Divide by 1e9 for 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 series means the pubkey was never seen in a retained snapshot.
  • Detecting re-delegation. If voter changes 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/latest for the newest epoch page, stake/epoch/{epoch} for a specific epoch, and stake/by-voter/{vote_pubkey} for all stakes on a validator.