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"
]
}
'import requests
url = "https://quoter.api.enso.build/api/v1/simulate/batch"
payload = {
"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"]
}
headers = {
"x-request-id": "<x-request-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-request-id': '<x-request-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
})
};
fetch('https://quoter.api.enso.build/api/v1/simulate/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quoter.api.enso.build/api/v1/simulate/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-request-id: <x-request-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quoter.api.enso.build/api/v1/simulate/batch"
payload := strings.NewReader("{\n \"chainId\": 1,\n \"transactions\": [\n {\n \"data\": \"0xabcdef\",\n \"value\": \"1000000000000000000\",\n \"to\": \"0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"operationType\": 123,\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\",\n \"executor\": \"<string>\",\n \"origin\": \"<string>\",\n \"authorityDelegate\": \"<string>\",\n \"initCode\": \"<string>\"\n }\n ],\n \"tokenIn\": [\n \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\n ],\n \"tokenOut\": [\n \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n ],\n \"amountIn\": [\n \"1000000000000000000\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quoter.api.enso.build/api/v1/simulate/batch")
.header("x-request-id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"chainId\": 1,\n \"transactions\": [\n {\n \"data\": \"0xabcdef\",\n \"value\": \"1000000000000000000\",\n \"to\": \"0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"operationType\": 123,\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\",\n \"executor\": \"<string>\",\n \"origin\": \"<string>\",\n \"authorityDelegate\": \"<string>\",\n \"initCode\": \"<string>\"\n }\n ],\n \"tokenIn\": [\n \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\n ],\n \"tokenOut\": [\n \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n ],\n \"amountIn\": [\n \"1000000000000000000\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quoter.api.enso.build/api/v1/simulate/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-request-id"] = '<x-request-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chainId\": 1,\n \"transactions\": [\n {\n \"data\": \"0xabcdef\",\n \"value\": \"1000000000000000000\",\n \"to\": \"0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"operationType\": 123,\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\",\n \"executor\": \"<string>\",\n \"origin\": \"<string>\",\n \"authorityDelegate\": \"<string>\",\n \"initCode\": \"<string>\"\n }\n ],\n \"tokenIn\": [\n \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\n ],\n \"tokenOut\": [\n \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n ],\n \"amountIn\": [\n \"1000000000000000000\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"chainId": 123,
"results": [
{
"simulationId": "<string>",
"chainId": 123,
"result": {
"amountOut": [
"<string>"
],
"gas": "<string>",
"error": {}
}
}
]
}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/route — route 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.
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"
]
}
'import requests
url = "https://quoter.api.enso.build/api/v1/simulate/batch"
payload = {
"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"]
}
headers = {
"x-request-id": "<x-request-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-request-id': '<x-request-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
})
};
fetch('https://quoter.api.enso.build/api/v1/simulate/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quoter.api.enso.build/api/v1/simulate/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-request-id: <x-request-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quoter.api.enso.build/api/v1/simulate/batch"
payload := strings.NewReader("{\n \"chainId\": 1,\n \"transactions\": [\n {\n \"data\": \"0xabcdef\",\n \"value\": \"1000000000000000000\",\n \"to\": \"0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"operationType\": 123,\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\",\n \"executor\": \"<string>\",\n \"origin\": \"<string>\",\n \"authorityDelegate\": \"<string>\",\n \"initCode\": \"<string>\"\n }\n ],\n \"tokenIn\": [\n \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\n ],\n \"tokenOut\": [\n \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n ],\n \"amountIn\": [\n \"1000000000000000000\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quoter.api.enso.build/api/v1/simulate/batch")
.header("x-request-id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"chainId\": 1,\n \"transactions\": [\n {\n \"data\": \"0xabcdef\",\n \"value\": \"1000000000000000000\",\n \"to\": \"0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"operationType\": 123,\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\",\n \"executor\": \"<string>\",\n \"origin\": \"<string>\",\n \"authorityDelegate\": \"<string>\",\n \"initCode\": \"<string>\"\n }\n ],\n \"tokenIn\": [\n \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\n ],\n \"tokenOut\": [\n \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n ],\n \"amountIn\": [\n \"1000000000000000000\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quoter.api.enso.build/api/v1/simulate/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-request-id"] = '<x-request-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chainId\": 1,\n \"transactions\": [\n {\n \"data\": \"0xabcdef\",\n \"value\": \"1000000000000000000\",\n \"to\": \"0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"operationType\": 123,\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\",\n \"executor\": \"<string>\",\n \"origin\": \"<string>\",\n \"authorityDelegate\": \"<string>\",\n \"initCode\": \"<string>\"\n }\n ],\n \"tokenIn\": [\n \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\n ],\n \"tokenOut\": [\n \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n ],\n \"amountIn\": [\n \"1000000000000000000\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"chainId": 123,
"results": [
{
"simulationId": "<string>",
"chainId": 123,
"result": {
"amountOut": [
"<string>"
],
"gas": "<string>",
"error": {}
}
}
]
}Headers
Body
Chain ID
1
Transactions to simulate in a single quoter call. All transactions share the same tokenIn, tokenOut, and amountIn.
Show child attributes
Show child attributes
Input token addresses (shared across all transactions)
[
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
]
Output token addresses (shared across all transactions)
[
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
]
Input amounts in wei (decimal or 0x strings, shared across all transactions)
["1000000000000000000"]
Was this page helpful?
