Skip to main content
The simulate endpoint executes your transaction on a forked EVM state and returns predicted output amounts, gas consumed, and a simulationId for subsequent validation.
To simulate multiple transactions in one request (same tokenIn, tokenOut, and amountIn), use the batch endpoint:
Pass transactions (an array of TransactionDto) instead of transaction. The response contains a results array in the same order — each item has the same shape as a single /simulate response, with its own simulationId for /validate. Up to 5 transactions per request.

Request Parameters

Top-level fields

Transaction fields

Response

Examples

Simulate a swap from ETH to USDC on Ethereum mainnet.

Handling Simulation Errors

When result.status is "Error", the result.error field contains details about why the transaction would fail. Common causes:
  • Contract revert — The transaction would revert on-chain (e.g., insufficient balance, failed require check)
  • Invalid calldata — The data field doesn’t match any function signature on the target contract
  • Out of gas — The transaction requires more gas than available
See the Error Handling reference for a full list of error types and how to handle them.

Updated