Trade Skill for Base Network for Openclaw

A powerful command-line utility for executing token swaps and trades on the Base network via Openclaw Skills.

0xrag
v0.1.0
Feb 12, 2026
0
1.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install trade

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install trade using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Trade Skill for Base Network?

The Trade skill is an essential component of Openclaw Skills designed for developers and AI agents to perform on-chain asset exchanges. By leveraging the CDP Swap API, this skill allows users to convert between tokens like USDC, ETH, and WETH with high precision and minimal configuration. It bridges the gap between terminal-based workflows and decentralized finance, providing a robust interface for liquidity management directly on the Base network.

Integrating this skill into your environment empowers your AI agents to manage portfolios and execute trades autonomously or through user-driven commands. Whether you are building automated trading bots or looking for a faster way to swap assets without a GUI, the Openclaw Skills trade module offers the flexibility and security required for modern blockchain interactions.

Trade Skill for Base Network Use Cases

  • Swapping USDC for ETH to cover gas fees on the Base network using Openclaw Skills.
  • Liquidating tokens into stablecoins like USDC during market volatility.
  • Automating portfolio rebalancing through scripted trade commands.
  • Converting WETH back to ETH for native network transactions.
  • Integrating decentralized exchange capabilities into AI-driven coding workflows.

How Trade Skill for Base Network Works

  1. Ensure the wallet is properly authenticated and initialized using the status command within the Openclaw Skills framework.
  2. Verify that the source wallet contains a sufficient balance of the token intended for sale.
  3. Execute the trade command by specifying the amount, source token, and destination token.
  4. The skill interacts with the CDP Swap API to find the best route and execute the transaction on the Base network.
  5. Receive a transaction confirmation or a detailed JSON response containing the swap results.

Trade Skill for Base Network Setup

First, verify your authentication status within the Openclaw Skills ecosystem:

npx awal@latest status

If the wallet is not authenticated, refer to the authenticate-wallet skill. Once ready, you can perform a swap using the following syntax:

npx awal@latest trade <amount> <from> <to> [options]

Example of a $1 USDC to ETH swap:

npx awal@latest trade '$1' usdc eth

Trade Skill for Base Network Data Schema & Taxonomy

The Trade skill processes inputs and provides outputs according to the following structures:

Supported Token Aliases

Alias Token Name Decimals Contract Address
usdc USD Coin 6 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
eth Ethereum 18 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
weth Wrapped ETH 18 0x4200000000000000000000000000000000000006

Amount Specification Formats

  • Dollar Notation: '$1.00' (Always use single quotes for shell safety).
  • Decimal Notation: 0.50 or 0.001.
  • Whole Numbers: 5 or 100.
  • Atomic Units: Large integers like 500000 (auto-detected based on token decimals).

Trade Skill for Base Network Advanced Features

  • Multi-chain support with the --chain option (defaults to Base) within Openclaw Skills.
  • Custom slippage tolerance configuration in basis points via the --slippage flag.
  • Structured JSON output mode for programmatic integration with other tools.
  • Automatic decimal detection for custom ERC-20 contract addresses.
  • Comprehensive error handling for liquidity issues, insufficient balances, and authentication failures.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*