Get account snapshot
https://api.triport.io/v1/sol/snapshot/account/So11111111111111111111111111111111111111112Returns the current on-chain state of a single Solana account — lamports, owner program, data, and the slot the snapshot was taken at.
Fetches the latest-slot snapshot of a single account by its base58 address. The
response mirrors a standard account read — lamports, the owner program id,
the executable flag, rent_epoch, the encoded account data, and the slot
the snapshot reflects — served from Triport's pre-built gPA snapshot cache
rather than a live node round-trip.
Use this when you need a consistent, cache-backed view of an account's state as
part of larger program-account (gPA) workloads, where issuing per-account live
reads would be too expensive. For one-off, latency-critical native balance
lookups prefer GET /v1/sol/wallet/balance/{address};
for the time-series stake-account queries built on the same snapshot store, see
the other snapshot endpoints (/v1/sol/snapshot/stake/*).
This is a Business-tier endpoint and requires the sol_gpa_snapshot scope.
Parameters
Path parameters
addressstringrequired^[1-9A-HJ-NP-Za-km-z]+$, length 32–44.Response
Response fields
| Field | Type | Description |
|---|---|---|
address | string | The account pubkey that was queried. |
lamports | integer (int64) | Account balance in lamports (≥ 0). |
owner | string | Program id that owns this account. |
executable | boolean | Whether the account holds an executable program. |
rent_epoch | integer (int64) | Epoch at which this account will next owe rent. |
data | object | Encoded account data; absent for accounts with no data. |
data.encoding | string | One of base64, base58, or jsonParsed. |
data.value | string | object | The encoded data — a string for base64/base58, or a parsed object for jsonParsed. |
slot | integer (int64) | Slot the snapshot reflects (≥ 0). |
Required fields always present: address, lamports, owner, executable.
Errors
| Code | Meaning | When it happens |
|---|---|---|
401 | unauthorized / trial_expired / subscription_expired | Missing or invalid credentials, or an expired trial/subscription. |
403 | tier_insufficient / method_unknown | Key lacks the sol_gpa_snapshot scope or is below the Business tier. |
429 | rate_limited | Sustained RPS for your tier exceeded; honor the Retry-After header. |
All errors use the shared envelope (error, message, request_id). See the
errors reference for the full envelope and per-code fields.
Example 429 body:
{
"error": "rate_limited",
"message": "Rate limit exceeded: sustained RPS on sol_gpa_snapshot (business tier)",
"request_id": "req_9f2c…",
"current_tier": "business",
"category": "sol_gpa_snapshot",
"limit_rps": 25,
"burst_capacity": 50,
"retry_after_sec": 1
}Examples
JavaScript (fetch)
const address = "So11111111111111111111111111111111111111112";
const res = await fetch(
`https://api.triport.io/v1/sol/snapshot/account/${address}`,
{
headers: {
Authorization: `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
}
);
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const snapshot = await res.json();
console.log(snapshot.owner, snapshot.lamports, snapshot.slot);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const snapshot = await triport.sol.snapshot.account(
"So11111111111111111111111111111111111111112"
);
console.log(snapshot.lamports, snapshot.owner, snapshot.slot);Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
snapshot = client.sol.snapshot.account(
"So11111111111111111111111111111111111111112"
)
print(snapshot["lamports"], snapshot["owner"], snapshot["slot"])Notes
- The snapshot reflects the latest slot captured by the cache, returned in the
slotfield — it may lag the chain head slightly. Compareslotacross calls to detect staleness. datais omitted for accounts that carry no data. When present, decodedata.valueaccording todata.encoding.- Related endpoints on the same snapshot store:
GET /v1/sol/snapshot/stake/latest,GET /v1/sol/snapshot/stake/epoch/{epoch},GET /v1/sol/snapshot/stake/by-voter/{vote_pubkey}, andGET /v1/sol/snapshot/stake/by-pubkey/{stake_pubkey}— all Business tier,sol_gpa_snapshotscope. - Authentication can also be supplied via the
X-API-Keyheader or the legacy?api-key=query parameter; see authentication.