Skip to main content
POST
/
api
/
v1
/
simulate
/
batch
Simulate multiple transactions in a single quoter call
curl --request POST \
  --url https://quoter.api.enso.build/api/v1/simulate/batch \
  --header 'Content-Type: application/json' \
  --header 'x-request-id: <x-request-id>' \
  --data '
{
  "chainId": 1,
  "transactions": [
    {
      "data": "0xabcdef",
      "value": "1000000000000000000",
      "to": "0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E",
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "operationType": 123,
      "receiver": "<string>",
      "spender": "<string>",
      "executor": "<string>",
      "origin": "<string>",
      "authorityDelegate": "<string>",
      "initCode": "<string>"
    }
  ],
  "tokenIn": [
    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
  ],
  "tokenOut": [
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  ],
  "amountIn": [
    "1000000000000000000"
  ]
}
'
{
  "chainId": 123,
  "results": [
    {
      "simulationId": "<string>",
      "chainId": 123,
      "result": {
        "amountOut": [
          "<string>"
        ],
        "gas": "<string>",
        "error": {}
      }
    }
  ]
}

Headers

x-request-id
string
required

Body

application/json
chainId
number
required

Chain ID

Example:

1

transactions
object[]
required

Transactions to simulate in a single quoter call. All transactions share the same tokenIn, tokenOut, and amountIn.

tokenIn
string[]
required

Input token addresses (shared across all transactions)

Example:
[
  "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
]
tokenOut
string[]
required

Output token addresses (shared across all transactions)

Example:
[
  "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
]
amountIn
string[]
required

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

Example:
["1000000000000000000"]

Response

200 - application/json
chainId
number
required

Chain ID

results
object[]
required

One result per input transaction, in the same order. Each item has its own simulationId for use with /validate.