execute_swap
Swap tokens on a DEX with slippage protection across EVM networks. Specify input and output tokens, amount, and minimum output to execute secure swaps.
Instructions
Execute a token swap on a DEX
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dex | No | Specific DEX to use | |
| network | No | Network name (e.g. 'bsc', 'opbnb', 'ethereum', 'base', etc.) or chain ID. Supports others main popular networks. Defaults to BSC mainnet. | bsc |
| tokenIn | Yes | Address of the token to sell | |
| amountIn | Yes | Amount of input token (in wei/smallest unit) | |
| deadline | No | Transaction deadline in seconds from now (default: 1200 = 20 minutes) | |
| tokenOut | Yes | Address of the token to buy | |
| privateKey | Yes | Private key in hex format (with or without 0x prefix). SECURITY: This is used only for address derivation and is not stored. The private key will not be logged or displayed in chat history. | |
| minAmountOut | Yes | Minimum amount of output token to receive (slippage protection) |