POSTsimulateTransaction

Simulate sending a transaction

Request Body
jsonrpcstringrequired
idintegerrequired
methodstringrequired
paramsoneOf[]required

It contains following items:

  1. Transaction (required)
  2. ConfigurationObject (optional)
params[0]string

Transaction, as an encoded string.

Responses
idinteger

The request ID

jsonrpcstring

The JSON-RPC version

contextobject

An object containing metadata about the current state of the Solana network at the time of the request.

apiVersionstring

The API version used for the request

slotinteger

The slot number at which the request was evaluated

valueobject
accountsobject[]
dataany[]

Data associated with the account, either as encoded binary data or JSON format {: } - depending on encoding parameter

executableboolean

Boolean indicating if the account contains a program (and is strictly read-only)

lamportsinteger (uint64)

Number of lamports assigned to this account

ownerstring

Base-58 encoded Pubkey of the program this account has been assigned to

rentEpochinteger (uint64)

The epoch at which this account will next owe rent

spaceinteger (uint64)

The data size of the account

errobject

Error if transaction failed, null if transaction succeeded.

innerInstructionsobject[]

Defined only if innerInstructions was set to true. The value is a list of inner instructions.

indexnumber

Index of the transaction instruction from which the inner instruction(s) originated

instructionsobject[]

Ordered list of inner program instructions that were invoked during a single transaction instruction.

programIdIndexnumber

Index into the message.accountKeys array indicating the program account that executes this instruction.

accountsnumber[]

List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program.

datastring

The program input data encoded in a base-58 string.

loadedAccountsDataSizeinteger

The number of bytes of all accounts loaded by this transaction

logsstring[]

Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute

replacementBlockhashobject
blockhashstring

The blockhash of the block, as base-58 encoded string

lastValidBlockHeightinteger (uint64)

The last valid block height at which the blockhash is still valid.

returnDataobject

The most-recent return data generated by an instruction in the transaction

programIdstring

the program that generated the return data, as base-58 encoded Pubkey

datastring

the return data itself, as base-64 encoded binary data

X-API-KEY
RequestCU100
cURL
curl -X POST "https://solana-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "simulateTransaction",
  "params": [
    "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEEjNmKiZGiOtSZ+g0//wH5kEQo3+UzictY+KlLV8hjXcs44M/Xnr+1SlZsqS6cFMQc46yj9PIsxqkycxJmXT+veJjIvefX4nhY9rY+B5qreeqTHu4mG6Xtxr5udn4MN8PnBt324e51j94YQl285GzN2rYa/E2DuQ0n/r35KNihi/zamQ6EeyeeVDvPVgUO2W3Lgt9hT+CfyqHvIa11egFPCgEDAwIBAAkDZAAAAAAAAAA=",
    {
      "commitment": "confirmed",
      "encoding": "base64",
      "replaceRecentBlockhash": true
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "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
    }
  },
  "id": 1
}