Simulates a raw transaction or transaction group as it would be evaluated on the network. The simulation will use blockchain state from the latest committed round. | Algorand Developer Portal

Simulates a raw transaction or transaction group as it would be evaluated on the network. The simulation will use blockchain state from the latest committed round.

POST

/v2/transactions/simulate

Authorizations

Parameters

Query Parameters

format
string
Allowed values: json msgpack
Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.

Request Body required

The transactions to simulate, along with any other inputs.

Select media typeapplication/jsonapplication/msgpack

Request type for simulation endpoint.

object

allow-empty-signatures
Allows transactions without signatures to be simulated as if they had correct signatures.
boolean

allow-more-logging
Lifts limits on log opcode usage during simulation.
boolean

allow-unnamed-resources
Allows access to unnamed resources during simulation.
boolean

exec-trace-config
An object that configures simulation execution trace.
object

enable
A boolean option for opting in execution trace features simulation endpoint.
boolean

scratch-change
A boolean option enabling returning scratch slot changes together with execution trace during simulation.
boolean

stack-change
A boolean option enabling returning stack changes together with execution trace during simulation.
boolean

state-change
A boolean option enabling returning application state changes (global, local, and box changes) with the execution trace during simulation.
boolean

extra-opcode-budget
Applies extra opcode budget during simulation for each transaction group.
integer

fix-signers
If true, signers for transactions that are missing signatures will be fixed during evaluation.
boolean

round
If provided, specifies the round preceding the simulation. State changes through this round will be used to run this simulation. Usually only the 4 most recent rounds will be available (controlled by the node config value MaxAcctLookback). If not specified, defaults to the latest available round.
integer

txn-groups
required
The transaction groups to simulate.
Array

txns
required
An atomic transaction group.
Array

Responses

200

Result of a transaction group simulation.

Select media typeapplication/jsonapplication/msgpack

object

eval-overrides
The set of parameters and limits override during simulation. If this set of parameters is present, then evaluation parameters may differ from standard evaluation in certain ways.
object

allow-empty-signatures
If true, transactions without signatures are allowed and simulated as if they were properly signed.
boolean

allow-unnamed-resources
If true, allows access to unnamed resources during simulation.
boolean

extra-opcode-budget
The extra opcode budget added to each transaction group during simulation
integer

fix-signers
If true, signers for transactions that are missing signatures will be fixed during evaluation.
boolean

max-log-calls
The maximum log calls one can make during simulation
integer

max-log-size
The maximum byte number to log during simulation
integer

exec-trace-config
An object that configures simulation execution trace.
object

enable
A boolean option for opting in execution trace features simulation endpoint.
boolean

scratch-change
A boolean option enabling returning scratch slot changes together with execution trace during simulation.
boolean

stack-change
A boolean option enabling returning stack changes together with execution trace during simulation.
boolean

initial-states
Initial states of resources that were accessed during simulation.
object

app-initial-states
The initial states of accessed application before simulation. The order of this array is arbitrary.
Array

app-boxes
An application’s global/local/box state.
object

account
The address of the account associated with the local state.
string

kvs
required
Key-Value pairs representing application states.
Array

400

Bad Request

Select media typeapplication/jsonapplication/msgpack

An error response with optional data field.

object

data
object

message
required
string

401

Invalid API Token

Select media typeapplication/jsonapplication/msgpack

An error response with optional data field.

object

data
object

message
required
string

500

Internal Error

Select media typeapplication/jsonapplication/msgpack

An error response with optional data field.

object

data
object

message
required
string

503

Service Temporarily Unavailable

Select media typeapplication/jsonapplication/msgpack

An error response with optional data field.

object

data
object

message
required
string

default

Unknown Error