v1

latestOpenAPI 3.0.02026-07-26278284.4 KB
quote

Simulate multiple transactions in a single quoter call

Standalone batch simulator that returns predicted output amounts and gas for up to 5 transactions that are ALREADY built (from any source). This is NOT part of the routing flow and is NOT a prerequisite for /shortcuts/routeroute already quotes internally and returns executable calldata in a single call. Do not call this before routing. Use it only to independently simulate/validate arbitrary transactions you already have. All transactions share the same tokenIn, tokenOut, and amountIn. Returns one simulationId per transaction for use with /validate.

post/api/v1/simulate/batch

Headers

x-request-idstring required

Request body

chainIdnumber required

Chain ID

tokenInstring[] required

Input token addresses (shared across all transactions)

tokenOutstring[] required

Output token addresses (shared across all transactions)

amountInstring[] required

Input amounts in wei (decimal or 0x strings, shared across all transactions)

Example request

{
  "chainId": 1,
  "transactions": [
    {
      "data": "0xabcdef",
      "value": "1000000000000000000",
      "to": "0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E",
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
    }
  ],
  "tokenIn": [
    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
  ],
  "tokenOut": [
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  ],
  "amountIn": [
    "1000000000000000000"
  ]
}

Response

chainIdnumber required

Chain ID