tradeSwap or trade tokens on Base network. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and WETH. Covers phrases like "buy ETH", "sell ETH for USDC", "convert USDC to ETH", "get some ETH".
Install via ClawdBot CLI:
clawdbot install 0xRAG/tradeUse the npx awal@latest trade command to swap tokens on Base network via the CDP Swap API. You must be authenticated to trade.
npx awal@latest status
If the wallet is not authenticated, refer to the authenticate-wallet skill.
npx awal@latest trade <amount> <from> <to> [options]
| Argument | Description |
| -------- | ---------------------------------------------------------------------- |
| amount | Amount to swap (see Amount Formats below) |
| from | Source token: alias (usdc, eth, weth) or contract address (0x...) |
| to | Destination token: alias (usdc, eth, weth) or contract address (0x...) |
The amount can be specified in multiple formats:
| Format | Example | Description |
| ------------- | ---------------------- | -------------------------------------- |
| Dollar prefix | '$1.00', '$0.50' | USD notation (decimals based on token) |
| Decimal | 1.0, 0.50, 0.001 | Human-readable with decimal point |
| Whole number | 5, 100 | Interpreted as whole tokens |
| Atomic units | 500000 | Large integers treated as atomic units |
Auto-detection: Large integers without a decimal point are treated as atomic units. For example, 500000 for USDC (6 decimals) = $0.50.
Decimals: For known tokens (usdc=6, eth=18, weth=18), decimals are automatic. For arbitrary contract addresses, decimals are read from the token contract.
| Option | Description |
| -------------------- | --------------------------------------------- |
| -c, --chain | Blockchain network (default: base) |
| -s, --slippage | Slippage tolerance in basis points (100 = 1%) |
| --json | Output result as JSON |
| Alias | Token | Decimals | Address |
| ----- | ----- | -------- | ------------------------------------------ |
| usdc | USDC | 6 | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| eth | ETH | 18 | 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE |
| weth | WETH | 18 | 0x4200000000000000000000000000000000000006 |
IMPORTANT: Always single-quote amounts that use $ to prevent bash variable expansion (e.g. '$1.00' not $1.00).
# Swap $1 USDC for ETH (dollar prefix — note the single quotes)
npx awal@latest trade '$1' usdc eth
# Swap 0.50 USDC for ETH (decimal format)
npx awal@latest trade 0.50 usdc eth
# Swap 500000 atomic units of USDC for ETH
npx awal@latest trade 500000 usdc eth
# Swap 0.01 ETH for USDC
npx awal@latest trade 0.01 eth usdc
# Swap with custom slippage (2%)
npx awal@latest trade '$5' usdc eth --slippage 200
# Swap using contract addresses (decimals read from chain)
npx awal@latest trade 100 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 0x4200000000000000000000000000000000000006
# Get JSON output
npx awal@latest trade '$1' usdc eth --json
awal status to check)Common errors:
awal auth login firstGenerated Mar 1, 2026
Individual users can swap tokens like USDC for ETH on the Base network for personal investment or spending. This skill handles common trading actions such as buying ETH with stablecoins or converting between wrapped and native ETH, making it suitable for everyday crypto enthusiasts managing their portfolios.
Users can quickly exchange tokens to provide liquidity or stake in decentralized finance protocols on Base. For example, swapping USDC to WETH to pair in a liquidity pool, enabling automated market making and earning yield from trading fees.
Businesses or advanced traders use this skill to rebalance token holdings across different networks by swapping on Base as a low-cost layer-2 solution. It supports custom contract addresses, allowing integration with various tokens beyond the default aliases for diversified asset strategies.
Merchants can accept payments in one token and convert them to another, such as swapping received ETH to USDC for stable value storage. This facilitates real-time settlement and reduces volatility exposure in crypto-based transactions for online businesses.
Generate income by charging a small percentage fee on each token swap executed through the skill. This model leverages high trading volumes on the Base network, with revenue scaling directly with user activity and transaction sizes.
Offer a premium tier with enhanced capabilities like lower slippage, priority routing, or access to exclusive token pairs. Users pay a monthly or annual fee, providing predictable revenue while incentivizing loyalty among frequent traders.
License the trading functionality to other platforms, such as wallets or exchanges, enabling them to embed token swaps seamlessly. Revenue comes from licensing fees or revenue-sharing agreements based on the volume processed through integrated services.
💬 Integration Tip
Ensure authentication is handled first via the 'authenticate-wallet' skill to avoid errors; use single quotes for dollar amounts in commands to prevent bash expansion issues.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.