SimulateTransaction - Algorand

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.

Endpoint

httpPOST /v2/transactions/simulate

Query Parameters

ParameterTypeRequiredDescription
formatstringOptionalConfigures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.

Example

bashexport ALGO_ALGOD=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl --location --request POST "${ALGO_ALGOD}v2/transactions/simulate" \
--header 'Content-Type: application/json' \
--data-binary '<request body>'

Response

Returns application/json. Top-level fields:

FieldTypeDescription
eval-overridesobjectThe set of parameters and limits override during simulation. If this set of parameters is present, then evaluation parameters may differ from standard evaluatio
exec-trace-configobjectAn object that configures simulation execution trace.
initial-statesobjectInitial states of resources that were accessed during simulation.
last-roundintegerThe round immediately preceding this simulation. State changes through this round were used to run this simulation.
txn-groupsarrayA result object for each transaction group that was simulated.
versionintegerThe version of this response object.

Error Handling

ErrorMessageDescription
400Bad requestA parameter was missing or malformed
404Not foundThe requested resource does not exist
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect