curl --request POST \
--url https://quoter.api.enso.build/api/v1/simulate \
--header 'Content-Type: application/json' \
--header 'x-request-id: <x-request-id>' \
--data '
{
"amountIn": [
"1000000000000000000"
],
"chainId": 1,
"tokenIn": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"tokenOut": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"transactions": [
{
"data": "0x1234",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"value": "1000000000000000000",
"executor": "<string>",
"operationType": 123,
"origin": "<string>",
"receiver": "<string>",
"spender": "<string>"
}
]
}
'import requests
url = "https://quoter.api.enso.build/api/v1/simulate"
payload = {
"amountIn": ["1000000000000000000"],
"chainId": 1,
"tokenIn": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"tokenOut": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"transactions": [
{
"data": "0x1234",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"value": "1000000000000000000",
"executor": "<string>",
"operationType": 123,
"origin": "<string>",
"receiver": "<string>",
"spender": "<string>"
}
]
}
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({
amountIn: ['1000000000000000000'],
chainId: 1,
tokenIn: '0xdac17f958d2ee523a2206206994597c13d831ec7',
tokenOut: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
transactions: [
{
data: '0x1234',
from: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
to: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
value: '1000000000000000000',
executor: '<string>',
operationType: 123,
origin: '<string>',
receiver: '<string>',
spender: '<string>'
}
]
})
};
fetch('https://quoter.api.enso.build/api/v1/simulate', 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",
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([
'amountIn' => [
'1000000000000000000'
],
'chainId' => 1,
'tokenIn' => '0xdac17f958d2ee523a2206206994597c13d831ec7',
'tokenOut' => '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
'transactions' => [
[
'data' => '0x1234',
'from' => '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
'to' => '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
'value' => '1000000000000000000',
'executor' => '<string>',
'operationType' => 123,
'origin' => '<string>',
'receiver' => '<string>',
'spender' => '<string>'
]
]
]),
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"
payload := strings.NewReader("{\n \"amountIn\": [\n \"1000000000000000000\"\n ],\n \"chainId\": 1,\n \"tokenIn\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n \"tokenOut\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\",\n \"transactions\": [\n {\n \"data\": \"0x1234\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"to\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"value\": \"1000000000000000000\",\n \"executor\": \"<string>\",\n \"operationType\": 123,\n \"origin\": \"<string>\",\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\"\n }\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")
.header("x-request-id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"amountIn\": [\n \"1000000000000000000\"\n ],\n \"chainId\": 1,\n \"tokenIn\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n \"tokenOut\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\",\n \"transactions\": [\n {\n \"data\": \"0x1234\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"to\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"value\": \"1000000000000000000\",\n \"executor\": \"<string>\",\n \"operationType\": 123,\n \"origin\": \"<string>\",\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quoter.api.enso.build/api/v1/simulate")
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 \"amountIn\": [\n \"1000000000000000000\"\n ],\n \"chainId\": 1,\n \"tokenIn\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n \"tokenOut\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\",\n \"transactions\": [\n {\n \"data\": \"0x1234\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"to\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"value\": \"1000000000000000000\",\n \"executor\": \"<string>\",\n \"operationType\": 123,\n \"origin\": \"<string>\",\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"amountOut": [
"1000000000000000000"
],
"error": {
"message": "<string>",
"payload": {
"payload": {
"index": "<string>",
"target": "<string>",
"data": "<string>",
"value": "<string>"
},
"type": "CallFailed"
}
},
"gas": "1000000000000000000",
"stateOverride": {}
}
]Simulate already-built transactions (standalone)
Standalone simulator that returns predicted output amounts and gas for 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.
curl --request POST \
--url https://quoter.api.enso.build/api/v1/simulate \
--header 'Content-Type: application/json' \
--header 'x-request-id: <x-request-id>' \
--data '
{
"amountIn": [
"1000000000000000000"
],
"chainId": 1,
"tokenIn": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"tokenOut": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"transactions": [
{
"data": "0x1234",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"value": "1000000000000000000",
"executor": "<string>",
"operationType": 123,
"origin": "<string>",
"receiver": "<string>",
"spender": "<string>"
}
]
}
'import requests
url = "https://quoter.api.enso.build/api/v1/simulate"
payload = {
"amountIn": ["1000000000000000000"],
"chainId": 1,
"tokenIn": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"tokenOut": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"transactions": [
{
"data": "0x1234",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"value": "1000000000000000000",
"executor": "<string>",
"operationType": 123,
"origin": "<string>",
"receiver": "<string>",
"spender": "<string>"
}
]
}
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({
amountIn: ['1000000000000000000'],
chainId: 1,
tokenIn: '0xdac17f958d2ee523a2206206994597c13d831ec7',
tokenOut: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
transactions: [
{
data: '0x1234',
from: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
to: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
value: '1000000000000000000',
executor: '<string>',
operationType: 123,
origin: '<string>',
receiver: '<string>',
spender: '<string>'
}
]
})
};
fetch('https://quoter.api.enso.build/api/v1/simulate', 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",
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([
'amountIn' => [
'1000000000000000000'
],
'chainId' => 1,
'tokenIn' => '0xdac17f958d2ee523a2206206994597c13d831ec7',
'tokenOut' => '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
'transactions' => [
[
'data' => '0x1234',
'from' => '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
'to' => '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
'value' => '1000000000000000000',
'executor' => '<string>',
'operationType' => 123,
'origin' => '<string>',
'receiver' => '<string>',
'spender' => '<string>'
]
]
]),
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"
payload := strings.NewReader("{\n \"amountIn\": [\n \"1000000000000000000\"\n ],\n \"chainId\": 1,\n \"tokenIn\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n \"tokenOut\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\",\n \"transactions\": [\n {\n \"data\": \"0x1234\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"to\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"value\": \"1000000000000000000\",\n \"executor\": \"<string>\",\n \"operationType\": 123,\n \"origin\": \"<string>\",\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\"\n }\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")
.header("x-request-id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"amountIn\": [\n \"1000000000000000000\"\n ],\n \"chainId\": 1,\n \"tokenIn\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n \"tokenOut\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\",\n \"transactions\": [\n {\n \"data\": \"0x1234\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"to\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"value\": \"1000000000000000000\",\n \"executor\": \"<string>\",\n \"operationType\": 123,\n \"origin\": \"<string>\",\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quoter.api.enso.build/api/v1/simulate")
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 \"amountIn\": [\n \"1000000000000000000\"\n ],\n \"chainId\": 1,\n \"tokenIn\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n \"tokenOut\": \"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\",\n \"transactions\": [\n {\n \"data\": \"0x1234\",\n \"from\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n \"to\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n \"value\": \"1000000000000000000\",\n \"executor\": \"<string>\",\n \"operationType\": 123,\n \"origin\": \"<string>\",\n \"receiver\": \"<string>\",\n \"spender\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"amountOut": [
"1000000000000000000"
],
"error": {
"message": "<string>",
"payload": {
"payload": {
"index": "<string>",
"target": "<string>",
"data": "<string>",
"value": "<string>"
},
"type": "CallFailed"
}
},
"gas": "1000000000000000000",
"stateOverride": {}
}
]Headers
Body
Request to quote multiple transactions
List of input amounts (as decimal strings)
Chain ID (e.g., 1 for Ethereum mainnet)
x >= 01
List of input token addresses
"0xdac17f958d2ee523a2206206994597c13d831ec7"
List of output token addresses
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
List of transactions to quote
Show child attributes
Show child attributes
Response
Quote successful
Status of the quote (Success or Error)
Success, Error Output amounts for each output token (as decimal strings)
Error details if the quote failed
Show child attributes
Show child attributes
Estimated gas for the transaction
"1000000000000000000"
State override used for simulation
Was this page helpful?
