simulateTransaction

POSTTransactionsAll plans

Runs a transaction against current bank state without submitting it, returning logs, balance changes and any error.

Try itSends a real request from your browser to the selected region.
POST
/

simulateTransaction executes a transaction locally against current state and reports what would happen — compute units consumed, program logs, balance changes, and any error — without broadcasting or spending a fee. sendTransaction's own preflight check uses this internally.

By default the transaction must be fully and validly signed, as for sendTransaction. sigVerify: false simulates an unsigned or placeholder-signed transaction instead, useful while accounts and instructions are still being iterated on.

Plans & rate limitsAll plans
Free2/s
Operator5/s
Blade Runner50/s
Nexus100/s

Parameters

params is a JSON array, with values in this order: transaction, config.

1transactionstringrequired

The transaction to simulate, wire-encoded per the encoding config field. Needs valid signatures unless sigVerify is set to false.

2configobject

Optional configuration.

Show propertiesProperties
commitmentstringdefault: "finalized"

Bank state to simulate against.

Allowed values:finalizedconfirmedprocessed
sigVerifybooleandefault: false

When true, the node verifies every signature and rejects the transaction if any are invalid or missing. When false (the default), signatures are not checked, so replaceRecentBlockhash becomes the only reliable way to guarantee a valid blockhash.

replaceRecentBlockhashbooleandefault: false

Replace the transaction's blockhash with the node's current latest blockhash before simulating. Requires sigVerify: false (a replaced blockhash would invalidate any real signatures).

encodingstringdefault: "base58"

Wire encoding of the transaction param.

Allowed values:base58base64
minContextSlotinteger

Minimum slot the node must have processed before simulating.

innerInstructionsbooleandefault: false

When true, includes CPI (inner) instructions in the response's innerInstructions field. Off by default to keep the response smaller.

accountsobject

Request post-simulation account state for specific accounts, instead of only balance/log/error information.

Show propertiesProperties
addressesstring[]required

Addresses to fetch post-simulation state for, base-58 encoded.

encodingstringdefault: "base64"

Encoding for the returned account data.

Allowed values:base58base64base64+zstdjsonParsed

Result

resultobject

Simulation outcome, wrapped with context.

Show propertiesProperties
contextobjectrequired
Show propertiesProperties
slotinteger
apiVersionstring
valueobjectrequired
Show propertiesProperties
errobject | string | nullrequired

Null if the transaction would succeed; a TransactionError otherwise.

logsstring[] | nullrequired

Program log output from the simulated execution.

feeinteger | null

Fee, in lamports, the transaction would be charged.

unitsConsumedinteger | null

Compute units the simulated execution consumed.

returnDataobject | null

Data returned by the last program invoked via sol_set_return_data, if any: {programId, data: [base64String, "base64"]}.

preBalancesinteger[]

Lamport balance of each account referenced, before simulated execution.

postBalancesinteger[]

Lamport balance of each account referenced, after simulated execution.

preTokenBalancesarray

Token balances before simulated execution, same shape as in getTransaction.

postTokenBalancesarray

Token balances after simulated execution.

innerInstructionsarray | null

CPI instructions triggered during simulation, only present when config.innerInstructions was true.

loadedAccountsDataSizeinteger | null

Total bytes of account data loaded to run the simulation.

replacementBlockhashobject | null

Present only when replaceRecentBlockhash was true: {blockhash, lastValidBlockHeight} for the blockhash actually used.

accountsarray | null

Post-simulation state for each address listed in config.accounts.addresses, in that order, or null for an address that doesn't exist. Only present when config.accounts was set.

Notes

  • The transfer instruction succeeds, but the simulation fails because it would leave the destination account with a positive balance below the rent-exemption minimum: a System-owned account must end a transaction at 0 lamports or at least the rent-exempt minimum, nothing in between.
  • sigVerify: false with replaceRecentBlockhash: true is the standard combination for iterating on an unsigned transaction; the node fills in a current blockhash without needing a throwaway signer.
  • A successful simulation is not a landing guarantee — state can change between simulating and actually submitting, especially for accounts under contention.