swapEvm · EVM Token Swap
may change things: you confirm before it runsExecute an EVM token swap on a particular chain using multiple DEX aggregators. Supports both exact input and exact output swaps with configurable slippage and price impact protection. tokenIn and tokenOut must be different addresses.
Input schema
{
"type": "object",
"properties": {
"chainName": {
"type": "string",
"enum": [
"ethereum",
"bsc",
"polygon",
"arbitrum",
"optimism",
"base",
"avalanche",
"zksync",
"scroll",
"gnosis",
"sonic",
"hyperevm",
"plasma",
"monad",
"robinhood"
],
"description": "Chain name where to execute the swap transaction"
},
"tokenIn": {
"type": "string",
"description": "Input token address (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native token like ETH, BNB)"
},
"tokenOut": {
"type": "string",
"description": "Output token address (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native token like ETH, BNB)"
},
"amount": {
"type": "string",
"description": "Amount to swap in decimal format. Cannot be zero. For exact input (isExactIn=true), this is the input amount; use \"-1\" to swap entire balance. For exact output (isExactIn=false), this is the desired output amount; \"-1\" is not allowed."
},
"isExactIn": {
"type": "boolean",
"description": "If true, swap exact input amount and receive variable output. If false, swap variable input to receive exact output amount."
},
"slippage": {
"description": "Slippage tolerance percentage (e.g., \"0.5\" for 0.5%). Default: 0.2% for stable-to-stable swaps and 0.5% otherwise. Min: 0.001%, max: 25%. Cannot be used together with limitAmount — use one or the other.",
"type": "string"
},
"priceImpact": {
"description": "Maximum acceptable price impact percentage (e.g., \"3.0\" for 3%). Default: 3%. Max: 90%. Protects against unfavorable trades.",
"type": "string"
},
"limitAmount": {
"description": "For exact input (isExactIn=true): minimum acceptable output amount. For exact output (isExactIn=false): maximum willing to spend. Cannot be used together with slippage — use one or the other.",
"type": "string"
},
"userAddress": {
"type": "string",
"description": "The wallet address of the user"
}
},
"required": [
"chainName",
"tokenIn",
"tokenOut",
"amount",
"isExactIn",
"userAddress"
],
"additionalProperties": false
}