Skip to main content

simulate

POST

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.

📘 Passing a signed transaction returns a transactionSigned error.

param[0]
parametersobjectrequired
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.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"method": "simulate",
"params": [
{
"tx_json": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Amount": "1000000",
"Destination": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"TransactionType": "Payment"
},
"binary": false
}
]
}'