TriportRPC

Get account snapshot

GEThttps://api.triport.io/v1/sol/snapshot/account/So11111111111111111111111111111111111111112

Returns the current on-chain state of a single Solana account — lamports, owner program, data, and the slot the snapshot was taken at.

Solanasol_gpa_snapshotBusiness — RPS-per-tier with 2× burst (no daily cap; see [rate limits & tiers](../../rate-limits-and-tiers.md))

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
Solana base58 pubkey (32 bytes). Must match ^[1-9A-HJ-NP-Za-km-z]+$, length 32–44.

Response

Response fields

FieldTypeDescription
addressstringThe account pubkey that was queried.
lamportsinteger (int64)Account balance in lamports (≥ 0).
ownerstringProgram id that owns this account.
executablebooleanWhether the account holds an executable program.
rent_epochinteger (int64)Epoch at which this account will next owe rent.
dataobjectEncoded account data; absent for accounts with no data.
data.encodingstringOne of base64, base58, or jsonParsed.
data.valuestring | objectThe encoded data — a string for base64/base58, or a parsed object for jsonParsed.
slotinteger (int64)Slot the snapshot reflects (≥ 0).

Required fields always present: address, lamports, owner, executable.

Errors

CodeMeaningWhen it happens
401unauthorized / trial_expired / subscription_expiredMissing or invalid credentials, or an expired trial/subscription.
403tier_insufficient / method_unknownKey lacks the sol_gpa_snapshot scope or is below the Business tier.
429rate_limitedSustained 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 slot field — it may lag the chain head slightly. Compare slot across calls to detect staleness.
  • data is omitted for accounts that carry no data. When present, decode data.value according to data.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}, and GET /v1/sol/snapshot/stake/by-pubkey/{stake_pubkey} — all Business tier, sol_gpa_snapshot scope.
  • Authentication can also be supplied via the X-API-Key header or the legacy ?api-key= query parameter; see authentication.