> For the complete documentation index, see [llms.txt](https://docs.solanavibestation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solanavibestation.com/api-reference/rewind/getaccountinfo.md).

# getAccountInfo

## getAccountInfo — Historical account lookup at a chosen slot or transaction

> Returns the state of \`pubkey\` at a chosen historical position.\
> \
> \*\*Parameters\*\*\
> \
> 0\. \`pubkey\` (required) — base58 account pubkey.\
> 1\. \`config\` (required) — positioning + encoding options. Either \`slot\` (end-of-slot) or \`anchor\` (per-transaction) must be set.<br>

```json
{"openapi":"3.0.3","info":{"title":"Rewind RPC: getAccountInfo","version":"1.0.0"},"tags":[{"name":"Rewind","description":"Historical account state and per-write change history."}],"servers":[{"url":"https://basic.rpc.solanavibestation.com","description":"Basic tier"},{"url":"https://ultra.rpc.solanavibestation.com","description":"Ultra tier"},{"url":"https://elite.rpc.solanavibestation.com","description":"Elite tier"},{"url":"https://epic.rpc.solanavibestation.com","description":"Epic tier"}],"security":[{},{"AuthHeader":[]},{"URLParameter":[]}],"components":{"securitySchemes":{"AuthHeader":{"type":"apiKey","in":"header","name":"Authorization","description":"Pass `Authorization: <api-key>` on each request. Auth is terminated upstream at the SVS load balancer."},"URLParameter":{"type":"apiKey","in":"query","name":"api_key","description":"Pass `?api_key=<api-key>` on the URL."}},"schemas":{"Anchor":{"type":"object","required":["signature"],"description":"Per-transaction positioning. The named transaction is resolved against the archive index and used as the boundary. `position` selects which side of the transaction:\n- `\"before\"` (default) — state the named tx itself read.\n- `\"after\"` — state immediately after the named tx finished writing.","properties":{"signature":{"type":"string","description":"Base58 transaction signature. The slot is derived automatically from the archive — you don't need to know it."},"position":{"type":"string","enum":["before","after"],"default":"before","description":"`before` (default) loads state the named tx itself read; `after` loads state immediately after the named tx finished writing."}}},"Encoding":{"type":"string","enum":["base64","base64+zstd","base58","jsonParsed"],"default":"base64","description":"Encoding for account data:\n- `base64` — standard base64.\n- `base64+zstd` — zstd-compressed (level 3) then base64'd.\n- `base58` — bs58. Rejected if post-`dataSlice` length > 129 bytes.\n- `jsonParsed` — solana-account-decoder for the standard parsable program set; falls back to `base64` for others."},"DataSlice":{"type":"object","required":["offset","length"],"description":"Byte-slice applied to the account's data before encoding. Rejected with `jsonParsed`.","properties":{"offset":{"type":"integer","format":"int64","minimum":0},"length":{"type":"integer","format":"int64","minimum":0}}},"JsonRpcEnvelope":{"type":"object","required":["jsonrpc","id"],"description":"Base envelope of every JSON-RPC 2.0 response.","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Echoed request id."}}},"RewindContext":{"type":"object","required":["apiVersion","slot"],"properties":{"apiVersion":{"type":"string"},"slot":{"type":"integer","format":"int64","description":"The resolved load slot. For end-of-slot calls this echoes the request's `slot`. For `anchor` calls this is the slot the signature resolves to (which the caller does not have to know in advance)."}}},"AccountInfo":{"type":"object","nullable":true,"description":"Account state, or `null` when no version exists at or before the resolved slot.","required":["lamports","owner","data","executable","rentEpoch","space","rewindSlot"],"properties":{"lamports":{"type":"integer","format":"int64","description":"Balance in lamports after this version."},"owner":{"type":"string","description":"Base58 program id that owns the account."},"data":{"oneOf":[{"type":"array","description":"[<encoded string>, \"<encoding>\"] for base64 / base64+zstd / base58.","items":{"type":"string"},"minItems":2,"maxItems":2},{"type":"object","description":"For `jsonParsed` (decoder succeeded): `{ \"program\": \"...\", \"parsed\": {...}, \"space\": <n> }`. Falls back to the `[encoded, encoding]` array form when the program is not parsable.","additionalProperties":true}]},"executable":{"type":"boolean"},"rentEpoch":{"type":"integer","format":"int64"},"space":{"type":"integer","format":"int64","description":"Original (pre-`dataSlice`) byte length."},"rewindSlot":{"type":"integer","format":"int64","description":"Rewind extension. Actual slot of the version returned (≤ `context.slot`). When this is less than the queried slot, it means the account wasn't written in the queried slot and the value carries forward from an earlier slot. Useful as a cache key and for audit / \"data is from slot X\" UI."}}},"JsonRpcErrorResponse":{"type":"object","required":["jsonrpc","id","error"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"error":{"$ref":"#/components/schemas/JsonRpcError"}}},"JsonRpcError":{"type":"object","required":["code","message"],"description":"Structured JSON-RPC error. Rewind-specific codes:\n\n- `-32014` Slot not available (future) — past `latestSlot`.\n- `-32015` Slot before earliest — older than `earliestSlot`.\n- `-32016` Signature not found — `anchor.signature` not indexed.\n- `-32017` FilteredAccountStale — simulation refused (filter set).\n- `-32018` SlotInArchiveGap — resolved load slot inside a known gap.\n","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":true,"description":"For `-32018`, includes `queriedSlot`, `gapStart`, `gapEnd`, `gapStatus`."}}}},"responses":{"UnauthorizedError":{"description":"Authentication required or invalid (terminated upstream at the SVS load balancer).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}},"ForbiddenError":{"description":"Insufficient permissions for the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}},"TooManyRequestsError":{"description":"Rate limit exceeded for this tier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}},"InternalServerError":{"description":"Unexpected server error. Treat as transient; safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}}}},"paths":{"/rewind":{"post":{"operationId":"getAccountInfo","summary":"getAccountInfo — Historical account lookup at a chosen slot or transaction","tags":["Rewind"],"description":"Returns the state of `pubkey` at a chosen historical position.\n\n**Parameters**\n\n0. `pubkey` (required) — base58 account pubkey.\n1. `config` (required) — positioning + encoding options. Either `slot` (end-of-slot) or `anchor` (per-transaction) must be set.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"],"description":"JSON-RPC protocol version."},"id":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Request identifier echoed back in the response."},"method":{"type":"string","enum":["getAccountInfo"],"description":"Must be `getAccountInfo`."},"params":{"type":"array","description":"Positional parameters [pubkey, config].","minItems":2,"maxItems":2,"items":{"anyOf":[{"title":"pubkey","type":"string","description":"Account pubkey, base58-encoded."},{"title":"config","type":"object","description":"Positioning + encoding options.","properties":{"slot":{"type":"integer","format":"int64","description":"End-of-slot boundary. Required unless `anchor` is set; rejected when `anchor` is set."},"anchor":{"$ref":"#/components/schemas/Anchor"},"encoding":{"$ref":"#/components/schemas/Encoding"},"dataSlice":{"$ref":"#/components/schemas/DataSlice"},"commitment":{"type":"string","description":"Accepted for compatibility; ignored. The archive only stores rooted data."},"tolerateGaps":{"type":"boolean","default":false,"description":"When `false` (default), queries that resolve to a slot inside a known MISSING/UNKNOWN archive gap return `-32018 SlotInArchiveGap`. Set `true` to bypass and accept potentially-stale at-or-before data."}}}]}}}}}}},"responses":{"200":{"description":"Successful `getAccountInfo` response.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/JsonRpcEnvelope"},{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["context","value"],"properties":{"context":{"$ref":"#/components/schemas/RewindContext"},"value":{"$ref":"#/components/schemas/AccountInfo"}}}}}]}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/TooManyRequestsError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
