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

# simulateHistoricalTransaction

## simulateHistoricalTransaction — Replay a transaction against historical state

> Replays a transaction against the archive's account state at a specified slot. Mirrors Solana's \`simulateTransaction\` response shape, pinned to historical state.\
> \
> \*\*Parameters\*\*\
> \
> 0\. \`transaction\` (required) — base64 (default) or base58 encoded transaction.\
> 1\. \`config\` (required) — see fields below. \`slot\` is required unless \`anchor\` is provided.<br>

```json
{"openapi":"3.0.3","info":{"title":"Rewind RPC: simulateHistoricalTransaction","version":"1.0.0"},"tags":[{"name":"Rewind","description":"Historical transaction simulation."}],"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","description":"Base58 transaction signature. The slot is derived automatically from the archive."},"position":{"type":"string","enum":["before","after"],"default":"before"}}},"AccountOverride":{"oneOf":[{"$ref":"#/components/schemas/StaticOverride"},{"$ref":"#/components/schemas/LoadAtOverride"}],"description":"One entry in `accountOverrides`. Either a static override (you supply the bytes) or a load-at override (the server reads at a per-account boundary), discriminated by the presence of a `loadAt` field."},"StaticOverride":{"type":"object","description":"Customer-supplied account state. Replaces whatever the loader would have produced for this pubkey.","required":["lamports","owner","data"],"properties":{"lamports":{"type":"integer","format":"int64","description":"Account lamports."},"owner":{"type":"string","description":"Base58 owner program id."},"data":{"type":"array","description":"`[encoded_bytes, encoding]`. `encoding` is `\"base64\"` or `\"base58\"`. Decoded data must be ≤ 10 MiB.","minItems":2,"maxItems":2,"items":{"type":"string"}},"executable":{"type":"boolean","default":false,"description":"Whether the account is an executable program."},"rentEpoch":{"type":"integer","format":"int64","description":"Rent epoch. Defaults to the rent-exempt sentinel (`2^64 - 1`)."}}},"LoadAtOverride":{"type":"object","description":"Per-account positioning. The server loads this account from the archive at the boundary specified by `loadAt`, while the rest of the simulation runs at the request-level position.","required":["loadAt"],"properties":{"loadAt":{"$ref":"#/components/schemas/LoadAtSpec"}}},"LoadAtSpec":{"type":"object","description":"Per-account position spec. Set either `slot` (end-of-slot) or `anchor` (per-transaction).","properties":{"slot":{"type":"integer","format":"int64","description":"End-of-slot boundary. Required unless `anchor` is set."},"anchor":{"$ref":"#/components/schemas/Anchor"}}},"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 resolved query/load slot."}}},"SimulateValue":{"type":"object","required":["logs","unitsConsumed","rewindSlot","rewindLoadSlot"],"properties":{"err":{"type":"object","nullable":true,"additionalProperties":true,"description":"`null` on success; on failure, a structured `TransactionError` matching Solana's wire shape."},"logs":{"type":"array","description":"Program log stream from execution.","items":{"type":"string"}},"accounts":{"type":"array","description":"Post-state of the addresses listed in `config.accounts.addresses`, in order. Entries the tx didn't touch are emitted as null in the wire format.","items":{"type":"object","additionalProperties":true}},"unitsConsumed":{"type":"integer","format":"int64"},"returnData":{"type":"object","nullable":true,"additionalProperties":true,"description":"Program-emitted return data when set; null otherwise."},"innerInstructions":{"type":"array","description":"Present when `config.innerInstructions = true`. Each entry: `{ index, instructions[] }` — one per outer instruction that produced inner instructions.","items":{"type":"object","additionalProperties":true}},"rewindSlot":{"type":"integer","format":"int64","description":"Rewind extension. Natural slot used for ALT resolution."},"rewindLoadSlot":{"type":"integer","format":"int64","description":"Rewind extension. Slot at which non-ALT account state was loaded; equals `rewindSlot` unless `preStateSlot` overrode it."},"rewindOverriddenAccounts":{"type":"array","description":"Rewind extension. Base58 pubkeys for which an `accountOverrides` entry was supplied and successfully applied. Always present; empty when no overrides were requested. A non-empty array means the result is hypothetical, not archive-truthful.","items":{"type":"string"}},"rewindOverrideLoads":{"type":"object","description":"Rewind extension. Map of `pubkey → { loadSlot }` for each `LoadAt` override, reporting the actual slot the engine loaded each per-account override from. `Static` overrides do not appear here. Always present; empty when no `LoadAt` entries were requested.","additionalProperties":{"type":"object","required":["loadSlot"],"properties":{"loadSlot":{"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":"Method-specific codes:\n- `-32014` `slot` past the archive's `latestSlot`.\n- `-32015` `slot` older than the archive's `earliestSlot`.\n- `-32016` `anchor.signature` (or `accountOverrides[].loadAt.anchor.signature`) not indexed in the archive.\n- `-32017` FilteredAccountStale — tx touches an account in the filter set (does not apply to `Static` overrides).\n- `-32018` SlotInArchiveGap — resolved load slot inside a known MISSING/UNKNOWN gap. For `LoadAt` overrides this is enforced per-entry, subject to the request-level `tolerateGaps`.\n- `-32602` Invalid params. For `accountOverrides`, includes: bad pubkey or encoding, oversize `data`, more than 64 entries, sysvar / ALT / discovered-programdata target, malformed `loadAt`, or `ProgramDataSlotMismatch` (a `LoadAt` slot-shifted a program without naming a matching slot for its programdata, or vice versa — the error message names both pubkeys).\n- `-32603` Internal error. Treat as transient; safe to retry.\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. Treat as transient; safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}}}},"paths":{"/rewind":{"post":{"operationId":"simulateHistoricalTransaction","summary":"simulateHistoricalTransaction — Replay a transaction against historical state","tags":["Rewind"],"description":"Replays a transaction against the archive's account state at a specified slot. Mirrors Solana's `simulateTransaction` response shape, pinned to historical state.\n\n**Parameters**\n\n0. `transaction` (required) — base64 (default) or base58 encoded transaction.\n1. `config` (required) — see fields below. `slot` is required unless `anchor` is provided.\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":["simulateHistoricalTransaction"]},"params":{"type":"array","description":"Positional parameters [transaction, config].","minItems":2,"maxItems":2,"items":{"anyOf":[{"title":"transaction","type":"string","description":"Encoded transaction (base64 by default; configurable via `config.encoding`)."},{"title":"config","type":"object","properties":{"slot":{"type":"integer","format":"int64","description":"Required unless `anchor` is provided. Slot at which to load ALTs and account state."},"anchor":{"$ref":"#/components/schemas/Anchor"},"preStateSlot":{"type":"integer","format":"int64","description":"Advanced — load non-ALT account state at this slot instead of `slot`. Common pattern `slot - 1` for \"as if this tx ran at slot start\". Ignored when `anchor` is set."},"encoding":{"type":"string","enum":["base64","base58"],"default":"base64","description":"Encoding of the transaction parameter."},"innerInstructions":{"type":"boolean","default":false},"accounts":{"type":"object","description":"Post-state of these accounts is returned in `result.value.accounts`.","required":["encoding","addresses"],"properties":{"encoding":{"type":"string","enum":["base64"]},"addresses":{"type":"array","items":{"type":"string"},"description":"Base58 pubkeys."}}},"sigVerify":{"type":"boolean","description":"Accepted for compatibility; ignored."},"replaceRecentBlockhash":{"type":"boolean","description":"Accepted for compatibility; ignored."},"commitment":{"type":"string","description":"Accepted for compatibility; ignored."},"tolerateGaps":{"type":"boolean","default":false,"description":"When `false` (default), simulations whose resolved load slot lands inside a known MISSING/UNKNOWN gap return `-32018 SlotInArchiveGap`."},"accountOverrides":{"type":"object","description":"Map of base58 pubkey to override entry. Each override replaces whatever the loader would have produced for that pubkey, so overrides always win.\n\nTwo entry shapes are supported, discriminated by the presence of a `loadAt` field:\n\n- **Static** — you supply the bytes (`lamports`, `owner`, `data`, optional `executable` and `rentEpoch`). Use to inject hypothetical state that didn't exist at any historical slot (\"what if this account held X tokens?\").\n- **LoadAt** — you supply a per-account `loadAt: { slot }` or `loadAt: { anchor: { signature, position } }` and the server reads the archive's actual value at that boundary. Use to time-shift one account relative to the rest of the simulation (e.g. \"use the oracle as it appeared 50 slots later\").\n\n**Limits and refusal rules**\n\n- Maximum **64** entries per request (across both shapes).\n- Sysvars (`Clock`, `Rent`, ...) cannot be overridden — they're reconstructed from the simulation slot. Use `preStateSlot` to shift apparent time.\n- Address Lookup Tables cannot be overridden — override the resolved accounts instead.\n- Static overrides of an upgradeable program's *programdata* account are rejected; override the program account itself, or use `LoadAt` on both at the same slot.\n- LoadAt overrides that slot-shift an upgradeable program without naming a matching slot for its programdata (or vice versa) return `-32602 ProgramDataSlotMismatch`.\n- Static-override data must decode to ≤ 10 MiB.\n\n**Truth signal.** Any override that successfully applies appears in `value.rewindOverriddenAccounts`. A non-empty array means the result is hypothetical, not archive-truthful.\n\n**Filter set interaction.** Static overrides for Vote/Stake accounts bypass the `-32017 FilteredAccountStale` refusal (your bytes, your truth). LoadAt overrides do not — the loader still enforces the filter set.\n","additionalProperties":{"$ref":"#/components/schemas/AccountOverride"}}}}]}}}}}}},"responses":{"200":{"description":"Successful simulation. Failed transactions still return logs and `unitsConsumed`; the application-level error is reported in `result.value.err`.","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/SimulateValue"}}}}}]}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/TooManyRequestsError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
