Get accounts in batch
Read up to 100 accounts in one request.
POST /accounts/batchRequest body
| Field | Type | Required | Description |
|---|---|---|---|
addresses | array | Yes | 1–100 base58 addresses. |
confirmation | string | No | processed, confirmed (default), or finalized. Applied to the whole batch — all accounts are read at the same slot, so results are consistent with each other. |
Example
curl -X POST https://api.sarg.am/v1/solana/accounts/batch \
-H "Authorization: Bearer $MAINLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"addresses": [
"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
]
}'{
"items": [
{
"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": { "state": "initialized" } } }
},
{
"address": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"exists": true,
"lamports": 1529000000,
"sol": 1.529,
"owner": "11111111111111111111111111111111",
"executable": false,
"space": 0,
"data": { "format": "base64", "base64": "", "program": null }
}
]
}items preserves the order of addresses. Nonexistent accounts come back as
{"address": "...", "exists": false} in their original position — the array
never has holes.
Each item has the same shape as Get an account.
Errors
code | When |
|---|---|
invalid_parameter | addresses is empty or has more than 100 entries (details.limit = 100). |
invalid_address | Any entry isn't valid base58 — details.address names the first offender. |
Under the hood
Replaces getMultipleAccounts and its per-account encoding handling.