Loading documentation…
Read a single Solana account's data and metadata over rpc edge JSON-RPC, with encoding and commitment options.
getAccountInfo returns all information associated with a single account: its lamport balance,
owner program, data, and metadata. It is the workhorse read for any client that needs on-chain
state - token accounts, program state, PDAs.
Use the JSON-RPC endpoint and authenticate like any other call:
https://rpc.rpcedge.com
https://frankfurt.rpc.rpcedge.comcurl -s https://rpc.rpcedge.com \
-H 'content-type: application/json' \
-H 'x-api-key: YOUR_UUID_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getAccountInfo",
"params": [
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
{ "encoding": "base64", "commitment": "processed" }
]
}'Or from Python with requests:
import requests
ENDPOINT = "https://rpc.rpcedge.com?key=YOUR_UUID_KEY"
res = requests.post(ENDPOINT, json={
"jsonrpc": "2.0",
"id": 1,
"method": "getAccountInfo",
"params": ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg", {"encoding": "base64"}],
})
print(res.json()["result"]["value"])| Position | Name | Type | Notes |
|---|---|---|---|
0 | pubkey | string | Base-58 account address to query. |
1 | config | object | Optional. Fields below. |
Config fields:
| Field | Type | Notes |
|---|---|---|
commitment | string | processed | confirmed | finalized. Defaults to finalized. |
encoding | string | base64 (recommended), base58 (slow, ≤129 bytes), base64+zstd, or jsonParsed. |
dataSlice | object | { offset, length } to return only a byte range - cheaper for large accounts. |
minContextSlot | number | Fail if the node is behind this slot. |
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": { "slot": 429641447 },
"value": {
"lamports": 2039280,
"owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"data": ["<base64>", "base64"],
"executable": false,
"rentEpoch": 361,
"space": 165
}
}
}| Field | Meaning |
|---|---|
context.slot | Slot the read was served at. |
value | null if the account does not exist. |
lamports | Balance in lamports (1 SOL = 1e9 lamports). |
owner | Program that owns the account. |
data | Account data - [string, encoding], or a parsed object with jsonParsed. |
space | Data length in bytes. |