Get an account
Low-level account info for any address — the escape hatch when higher-level endpoints aren't enough.
GET /accounts/{address}Everything on Solana is an account. This endpoint is the low-level escape hatch for reading any of them — program state, PDAs, config accounts. If you just want balances or tokens, use the Wallets endpoints instead.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
address | path | string | Yes | Any base58 account address. |
confirmation | query | string | No | processed, confirmed (default), or finalized. |
Example
curl https://api.sarg.am/v1/solana/accounts/4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T \
-H "Authorization: Bearer $MAINLY_API_KEY"{
"address": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
"exists": true,
"lamports": 2039280,
"sol": 0.00203928,
"owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"executable": false,
"space": 165,
"data": {
"format": "parsed",
"program": "spl-token",
"parsed": {
"type": "account",
"info": {
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"owner": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"tokenAmount": { "raw": "42000000", "decimals": 6, "ui": 42.0, "uiString": "42" },
"state": "initialized"
}
}
}
}For a nonexistent account you get 200 with {"address": "...", "exists": false} —
not a 404 — because "no account here yet" is a normal, expected state on Solana.
Response fields
| Field | Type | Description |
|---|---|---|
exists | boolean | Whether the account currently exists on-chain. |
owner | string | The program that owns this account (not a user). 1111... means the System Program — a regular wallet. |
executable | boolean | true for programs (smart contracts). |
space | number | Size of the account's data in bytes. |
data | object | Decoded account data — see below. |
The data object
When the owning program is one of the hundreds we can decode, format is
"parsed" and you get structured JSON (as above). Otherwise format is
"base64":
{ "data": { "format": "base64", "base64": "AQAAAAt...", "program": null } }You never get base58, base64+zstd, or the raw [data, encoding] tuples RPC
uses — it's parsed JSON or plain base64, always.
Errors
code | When |
|---|---|
invalid_address | The path parameter isn't valid base58. |
Under the hood
Replaces getAccountInfo with its five encoding modes and silent
jsonParsed-to-base64 fallback.