# getAccountDiff

## getAccountDiff — Two-point diff for one account

> Two-point diff for a single account. Each side accepts the same positioning modes as \`getAccountInfo\` — end-of-slot via \`slotA\`/\`slotB\`, or per-transaction via \`anchorA\`/\`anchorB\`. Fields are suffixed \`A\`/\`B\` so both sides coexist in one config object.\
> \
> \*\*Parameters\*\*\
> \
> 0\. \`pubkey\` (required) — base58.\
> 1\. \`config\` (required) — see fields below.<br>

```json
{"openapi":"3.0.3","info":{"title":"Rewind RPC: getAccountDiff","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."},"URLParameter":{"type":"apiKey","in":"query","name":"api_key","description":"Pass `?api_key=<api-key>` on the URL."}},"schemas":{"Anchor":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string"},"position":{"type":"string","enum":["before","after"],"default":"before"}}},"Encoding":{"type":"string","enum":["base64","base64+zstd","base58","jsonParsed"],"default":"base64"},"DataSlice":{"type":"object","required":["offset","length"],"properties":{"offset":{"type":"integer","format":"int64","minimum":0},"length":{"type":"integer","format":"int64","minimum":0}}},"JsonRpcEnvelope":{"type":"object","required":["jsonrpc","id"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]}}},"AccountInfo":{"type":"object","nullable":true,"required":["lamports","owner","data","executable","rentEpoch","space","rewindSlot"],"properties":{"lamports":{"type":"integer","format":"int64"},"owner":{"type":"string"},"data":{"oneOf":[{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},{"type":"object","additionalProperties":true}]},"executable":{"type":"boolean"},"rentEpoch":{"type":"integer","format":"int64"},"space":{"type":"integer","format":"int64"},"rewindSlot":{"type":"integer","format":"int64","description":"Rewind extension. Actual slot of the version returned for this side. May predate the queried position when the value carries forward."}}},"Diff":{"type":"object","nullable":true,"description":"`null` when either side is `null`. `lamportsDelta` and `rentEpochDelta` are i128 (signed) to represent negative changes.","required":["lamportsDelta","ownerChanged","executableChanged","rentEpochDelta","dataChanged","dataLenA","dataLenB"],"properties":{"lamportsDelta":{"type":"string","description":"Decimal-string i128 (B − A)."},"ownerChanged":{"type":"boolean"},"executableChanged":{"type":"boolean"},"rentEpochDelta":{"type":"string","description":"Decimal-string i128 (B − A)."},"dataChanged":{"type":"boolean","description":"Computed by direct byte equality of the archived data, not by hash. True even for accounts not yet covered by the dedup pointer."},"dataLenA":{"type":"integer","format":"int64"},"dataLenB":{"type":"integer","format":"int64"}}},"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":"Same set as `getAccountInfo`, applied to both sides. The side (A/B) is named in the error message.","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":{"/rewind":{"post":{"operationId":"getAccountDiff","summary":"getAccountDiff — Two-point diff for one account","tags":["Rewind"],"description":"Two-point diff for a single account. Each side accepts the same positioning modes as `getAccountInfo` — end-of-slot via `slotA`/`slotB`, or per-transaction via `anchorA`/`anchorB`. Fields are suffixed `A`/`B` so both sides coexist in one config object.\n\n**Parameters**\n\n0. `pubkey` (required) — base58.\n1. `config` (required) — see fields below.\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":["getAccountDiff"]},"params":{"type":"array","description":"Positional parameters [pubkey, config].","minItems":2,"maxItems":2,"items":{"anyOf":[{"title":"pubkey","type":"string"},{"title":"config","type":"object","properties":{"slotA":{"type":"integer","format":"int64","description":"End-of-slot at A. Required unless `anchorA` is set."},"anchorA":{"$ref":"#/components/schemas/Anchor"},"slotB":{"type":"integer","format":"int64","description":"End-of-slot at B. Required unless `anchorB` is set."},"anchorB":{"$ref":"#/components/schemas/Anchor"},"encoding":{"$ref":"#/components/schemas/Encoding"},"dataSlice":{"$ref":"#/components/schemas/DataSlice"},"tolerateGaps":{"type":"boolean","default":false,"description":"Single flag covering both sides."}}}]}}}}}}},"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":{"type":"object","required":["apiVersion"],"properties":{"apiVersion":{"type":"string"}}},"value":{"type":"object","required":["a","b"],"properties":{"a":{"$ref":"#/components/schemas/AccountInfo"},"b":{"$ref":"#/components/schemas/AccountInfo"},"diff":{"$ref":"#/components/schemas/Diff"}}}}}}}]}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/TooManyRequestsError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.solanavibestation.com/developers/rewind/overview/getaccountdiff.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
