circle wallet swap. Optionally get a
price quote first to verify the expected output before committing funds.
Prerequisites
Before you begin, ensure you have:- Installed Node.js v20.18.2 or later.
-
Installed Circle CLI:
- Completed the Agent Wallets quickstart (authenticates and funds your wallet).
Steps
1
Get a quote (optional)
Run
circle wallet swap with --quote to see the estimated output without
executing the swap:2
Swap tokens
Run
circle wallet swap with your wallet address and a <buyAmount>
stop-limit. If the estimated output falls below this value onchain, the swap
fails instead of settling at an unfavorable rate:--slippage-bps to set maximum slippage.