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) |
Échangez ou échangez des jetons via des échanges décentralisés sur n'importe quelle chaîne prise en charge. À utiliser lorsque vous ou l'utilisateur souhaitez échanger, échanger, acheter, vendre ou convertir entre des jetons comme USDC, ETH, WETH, SOL ou tout autre jeton. Couvre des expressions telles que « acheter de l'ETH avec l'USDC », « vendre de l'ETH contre de l'USDC », « convertir l'USDC en ETH », « échanger des jetons », « obtenir de l'ETH ». Source : financedistrict-platform/fd-agent-wallet-skills.