POSTsimulate

XRP Ledger Mainnethttps://xrpl-mainnet.nodit.io/

Previews the results and metadata of a transaction without committing it to the ledger. It works for every transaction type and is used as a pre-flight check before submitting.

Request Body
methodstringrequired
tx_jsonobject

The transaction to simulate. It must be unsigned. If Fee, Sequence, SigningPubKey or NetworkID are omitted, the server fills them in automatically.

tx_blobstring

The transaction to simulate, hex-encoded. It must be unsigned.

binaryboolean

Whether to return the transaction and its metadata as hex strings.

Responses
tx_jsonobject

The simulated transaction with the values the server filled in. Returned when binary is false.

tx_blobstring

The simulated transaction, hex-encoded. Returned when binary is true.

ledger_indexinteger

The ledger index the transaction would have been included in.

metaobject

The metadata describing the simulation results. Returned when binary is false.

meta_blobstring

The metadata, hex-encoded. Returned when binary is true.

engine_resultstring

The result code of the transaction. (e.g.) tesSUCCESS

engine_result_codeinteger

The numeric value corresponding to the result code.

engine_result_messagestring

A human-readable explanation of the result.

appliedboolean

Whether the transaction was applied to the ledger. Because this is a simulation, nothing is actually committed.

X-API-KEY
RequestCU25
cURL
curl -X POST "https://xrpl-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "simulate",
  "params": [
    {
      "tx_json": {
        "Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
        "Amount": "1000000",
        "Destination": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
        "TransactionType": "Payment"
      },
      "binary": false
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "applied": false,
    "engine_result": "tesSUCCESS",
    "engine_result_code": 0,
    "engine_result_message": "The simulated transaction would have been applied.",
    "ledger_index": 98765433,
    "meta": {
      "TransactionIndex": 0,
      "TransactionResult": "tesSUCCESS",
      "delivered_amount": "1000000"
    },
    "tx_json": {
      "Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "Amount": "1000000",
      "Destination": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
      "Fee": "12",
      "Sequence": 42,
      "SigningPubKey": "",
      "TransactionType": "Payment"
    }
  }
}