Skip to main content
POST
simulateTransaction
curl --request POST \
  --url 'https://mainnet.helius-rpc.com/?api-key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "simulateTransaction",
  "params": [
    "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=",
    {
      "encoding": "base64"
    }
  ]
}
'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "context": {
      "apiVersion": "2.3.3",
      "slot": 393226680
    },
    "value": {
      "accounts": null,
      "err": null,
      "innerInstructions": null,
      "loadedAccountsDataSize": 413,
      "logs": [
        "Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb invoke [1]",
        "Program log: Instruction: Transfer",
        "Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb consumed 1714 of 200000 compute units",
        "Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb success"
      ],
      "replacementBlockhash": {
        "blockhash": "6oFLsE7kmgJx9PjR4R63VRNtpAVJ648gCTr3nq5Hihit",
        "lastValidBlockHeight": 381186895
      },
      "returnData": null,
      "unitsConsumed": 1714
    }
  }
}

Request Parameters

transaction
string
required
The signed transaction, as an encoded string (base58 or base64).
encoding
string
Encoding used for the transaction data.
  • base58
  • base64
skipPreflight
boolean
Skip the preflight transaction checks.
preflightCommitment
string
Commitment level to use for preflight.
  • confirmed
  • finalized
  • processed
sigVerify
boolean
If true, verify the transaction signatures.
replaceRecentBlockhash
boolean
If true, replace the transaction recent blockhash with the most recent one.
minContextSlot
number
Minimum slot at which to perform preflight transaction checks.
innerInstructions
boolean
If true, include inner instructions in the response.
accounts
object
accounts.addresses
array
Array of accounts to return, as base-58 encoded strings.
accounts.encoding
string
Encoding format for returned account data.
  • base64
  • base58
  • base64+zstd
  • jsonParsed

Authorizations

api-key
string
query
required

Your Helius API key. You can get one for free in the dashboard.

Body

application/json
jsonrpc
enum<string>
default:2.0

The JSON-RPC protocol version.

Available options:
2.0
Example:

"2.0"

id
string
default:1

A unique identifier for the request.

Example:

"1"

method
enum<string>
default:simulateTransaction

The name of the RPC method to invoke.

Available options:
simulateTransaction
Example:

"simulateTransaction"

params
(string | object)[]

Parameters for simulating a transaction.

The signed transaction, as an encoded string (base58 or base64).

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU="

Response

Successfully simulated the transaction.

jsonrpc
enum<string>

The JSON-RPC protocol version.

Available options:
2.0
Example:

"2.0"

id
string

Identifier matching the request.

Example:

"1"

result
object

Result of the simulated transaction.