curl --request POST \
--url https://api.example.com/api/quote \
--header 'Content-Type: application/json' \
--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>"
}
]
}
'[
{
"status": "Success",
"amountOut": [
"1000000000000000000"
],
"error": {
"message": "<string>",
"payload": {
"payload": {
"index": "<string>",
"target": "<string>",
"data": "<string>",
"value": "<string>"
},
"type": "CallFailed"
}
},
"gas": "1000000000000000000",
"stateOverride": {}
}
]Returns output amounts and gas for the given transactions.
curl --request POST \
--url https://api.example.com/api/quote \
--header 'Content-Type: application/json' \
--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>"
}
]
}
'[
{
"status": "Success",
"amountOut": [
"1000000000000000000"
],
"error": {
"message": "<string>",
"payload": {
"payload": {
"index": "<string>",
"target": "<string>",
"data": "<string>",
"value": "<string>"
},
"type": "CallFailed"
}
},
"gas": "1000000000000000000",
"stateOverride": {}
}
]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
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
Estimated gas for the transaction
"1000000000000000000"
State override used for simulation
Was this page helpful?