> 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/methods/getaccountchanges.md).

# getAccountChanges

## getAccountChanges — Per-write change history for one account

> Returns every archived write to \`pubkey\` in \`\[fromSlot, toSlot]\`, newest first.\
> \
> \*\*Parameters\*\*\
> \
> 0\. \`pubkey\` (required) — base58 account pubkey.\
> 1\. \`config\` (required) — see fields below.\
> \
> \*\*Tips\*\*\
> \
> \- To see only the writes that changed the account's contents, filter rows on \`dataChanged\` with \`includeData: false\` — much cheaper than hydrating every row.\
> \- \`writeVersion\` in a row can be passed straight back as an inside-slot cursor to \`getHistoricalAccountInfo\` / \`getMultipleHistoricalAccounts\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Rewind RPC: getAccountChanges","version":"1.0.0"},"tags":[{"name":"Rewind","description":"Historical account state, per-write change history, and historical simulation."}],"servers":[{"url":"https://rewind.solanavibestation.com","description":"Rewind service (all tiers routed by API key)"}],"security":[{},{"AuthHeader":[]},{"URLParameter":[]}],"components":{"securitySchemes":{"AuthHeader":{"type":"apiKey","in":"header","name":"Authorization","description":"Pass `Authorization: <api-key>` on each request."},"URLParameter":{"type":"apiKey","in":"query","name":"api_key","description":"Pass `?api_key=<api-key>` on the URL."}},"schemas":{"DataSlice":{"type":"object","required":["offset","length"],"description":"Byte-slice applied to each row's data.","properties":{"offset":{"type":"integer","format":"int64","minimum":0},"length":{"type":"integer","format":"int64","minimum":0}}},"Cursor":{"type":"object","required":["slot","writeVersion"],"description":"Stable per-write cursor. Values come from a previous response's `next` or from any `changes` row.","properties":{"slot":{"type":"integer","format":"int64"},"writeVersion":{"type":"integer","format":"int64"}}},"Anchor":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string"},"position":{"type":"string","enum":["before","after"],"default":"before"}}},"JsonRpcEnvelope":{"type":"object","required":["jsonrpc","id"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"RewindContext":{"type":"object","required":["apiVersion","slot"],"properties":{"apiVersion":{"type":"string"},"slot":{"type":"integer","format":"int64","description":"The requested `toSlot`."}}},"ChangeRow":{"type":"object","required":["slot","writeVersion","lamports","owner","executable","rentEpoch","space","dataHash","txnSignature","dataChanged"],"properties":{"slot":{"type":"integer","format":"int64","description":"Slot the write landed in."},"writeVersion":{"type":"integer","format":"int64","description":"Position of this write inside the slot. Together with `slot` this is a stable cursor and a stable version identity."},"lamports":{"type":"integer","format":"int64","description":"Balance after this write."},"owner":{"type":"string","description":"Base58 program id that owns the account after this write."},"executable":{"type":"boolean"},"rentEpoch":{"type":"integer","format":"int64"},"space":{"type":"integer","format":"int64","description":"Full data length before `dataSlice`."},"dataHash":{"type":"string","description":"Hex hash of the data bytes; byte-identical writes share a `dataHash`."},"txnSignature":{"type":"string","nullable":true,"description":"Base58 signature of the transaction that produced the write; `null` for writes not tied to a transaction (sysvars, rent)."},"dataChanged":{"type":"boolean","description":"`true` when this write changed the data bytes; `false` when only metadata (lamports, owner, etc.) changed."},"data":{"type":"array","description":"Present only when `includeData` was set. `[<encoded>, <encoding>]` for `base64` / `base64+zstd` / `base58`.","items":{"type":"string"},"minItems":2,"maxItems":2}}},"GapRange":{"type":"object","required":["fromSlot","toSlot","status"],"properties":{"fromSlot":{"type":"integer","format":"int64"},"toSlot":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["partial","missing","unknown"]}}},"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":"This method never returns `-32018`. Other codes:\n- `-32602` Invalid params (bad range, bad limit, `includeData` without `encoding`, `jsonParsed`, `before` combined with `anchor`).\n- `-32014` `toSlot` above `latestSlot`.\n- `-32015` `fromSlot` below `earliestSlot`.\n- `-32016` `anchor.signature` not indexed.\n- `-32603` Internal error.\n","properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":true}}}},"responses":{"UnauthorizedError":{"description":"Authentication required or invalid.","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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}}}},"paths":{"/":{"post":{"operationId":"getAccountChanges","summary":"getAccountChanges — Per-write change history for one account","tags":["Rewind"],"description":"Returns every archived write to `pubkey` in `[fromSlot, toSlot]`, newest first.\n\n**Parameters**\n\n0. `pubkey` (required) — base58 account pubkey.\n1. `config` (required) — see fields below.\n\n**Tips**\n\n- To see only the writes that changed the account's contents, filter rows on `dataChanged` with `includeData: false` — much cheaper than hydrating every row.\n- `writeVersion` in a row can be passed straight back as an inside-slot cursor to `getHistoricalAccountInfo` / `getMultipleHistoricalAccounts`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"method":{"type":"string","enum":["getAccountChanges"]},"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","required":["fromSlot","toSlot"],"properties":{"fromSlot":{"type":"integer","format":"int64","description":"Inclusive lower bound. Must be at or above `earliestSlot`."},"toSlot":{"type":"integer","format":"int64","description":"Inclusive upper bound. Must be at or below `latestSlot`, and `fromSlot <= toSlot`."},"limit":{"type":"integer","format":"int32","minimum":1,"default":100,"description":"Rows per page. At most **1000**, or **50** when `includeData` is set."},"includeData":{"type":"boolean","default":false,"description":"Include each row's `data`. Requires `encoding`."},"encoding":{"type":"string","enum":["base64","base64+zstd","base58"],"description":"Required when `includeData` is set. `jsonParsed` is **not** supported here."},"dataSlice":{"$ref":"#/components/schemas/DataSlice"},"before":{"$ref":"#/components/schemas/Cursor"},"anchor":{"$ref":"#/components/schemas/Anchor"}}}]}}}}}}},"responses":{"200":{"description":"Successful 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":{"type":"object","required":["changes","next","truncatedByBytes","gaps"],"properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/ChangeRow"}},"next":{"type":"object","nullable":true,"description":"Cursor for the next page; `null` at end of range. Pass back as `before`. Same shape as `Cursor`.","required":["slot","writeVersion"],"properties":{"slot":{"type":"integer","format":"int64"},"writeVersion":{"type":"integer","format":"int64"}}},"truncatedByBytes":{"type":"boolean","description":"True if the 10 MiB response cap was reached; `next` points at the first row that did not fit."},"gaps":{"type":"array","description":"Contiguous `partial`/`missing`/`unknown` ranges intersecting `[fromSlot, toSlot]`. Treat as stream discontinuities. `skipped` ranges are omitted.","items":{"$ref":"#/components/schemas/GapRange"}}}}}}}}]}}}},"400":{"description":"Malformed JSON."},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/TooManyRequestsError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
