swap
Execute token swaps on Ethereum by handling approvals and router calls for ERC20 and ERC6909 tokens with configurable parameters.
Instructions
Swap ERC20 and ERC6909 tokens (proper approvals then router call).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tokenIn": "<tokenIn>",
"tokenOut": "<tokenOut>",
"amount": "<amount>",
"side": "<side>"
},
"name": "swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokenIn | Yes | Symbol (e.g. "USDT") or { address, id? } | |
| tokenOut | Yes | Symbol (e.g. "IZO") or { address, id? } | |
| amount | Yes | Human-readable amount, e.g. 1.5 | |
| side | Yes | ||
| slippageBps | No | Basis points, default 50 = 0.50% | |
| deadlineSeconds | No | From now, default 300s | |
| owner | No | ||
| finalTo | No | ||
| router | No |