Use the fdx call swapTokens command to swap between tokens via decentralized exchanges on any supported chain. Unlike centralized exchange swaps, these execute directly on-chain through DEX protocols.
If the wallet is not authenticated, refer to the authenticate skill.
| --chainKey | Yes | Blockchain to swap on (e.g. ethereum, polygon, base, solana) | | --tokenIn | Yes | Source token — symbol (e.g. USDC, ETH) or contract address | | --tokenOut | Yes | Destination token — symbol or contract address | | --amount | Yes | Amount of tokenIn to swap (human-readable) | | --mode | No | Swap mode (e.g. exact input, exact output) |
Intercambie o intercambie tokens a través de intercambios descentralizados en cualquier cadena compatible. Úselo cuando usted o el usuario quieran intercambiar, intercambiar, comprar, vender o convertir entre tokens como USDC, ETH, WETH, SOL o cualquier otro token. Cubre frases como "comprar ETH con USDC", "vender ETH por USDC", "convertir USDC a ETH", "intercambiar tokens", "obtener algo de ETH". Fuente: financedistrict-platform/fd-agent-wallet-skills.