Dex Agent
Skill by avmw2025
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/avmw2025/dex-agentDEX Agent — Direct DeFi Trading Skill
Zero-fee DeFi trading for OpenClaw agents. Bankr alternative.
Description
Direct DEX swap execution on Base chain via Uniswap V3. Self-custodial, open-source, zero middleman fees. Includes real-time price feeds, swap quotes, stop-loss, take-profit, portfolio tracking, and configurable risk management.
When to Use
- User asks to trade crypto, swap tokens, or execute DeFi trades
- User wants to check token prices on Base chain
- User needs stop-loss or take-profit orders
- User wants to manage a trading wallet
- User is looking for a Bankr alternative with lower fees
- User needs configurable risk limits (daily trades, position caps, drawdown protection)
Setup
- Install dependencies:
pip3 install web3 eth-abi - Generate a wallet:
python3 agent.py wallet generate - Fund the wallet with ETH (gas) and USDC (trading) on Base chain
- (Optional) Create
trading-config.jsonto override risk defaults - Start trading!
Commands
Price Check
cd <skill_dir>/scripts && python3 agent.py price WETH
cd <skill_dir>/scripts && python3 agent.py price BRETT
Get Quote
cd <skill_dir>/scripts && python3 agent.py quote USDC WETH 10.0
Execute Swap
cd <skill_dir>/scripts && python3 agent.py swap USDC WETH 5.0
cd <skill_dir>/scripts && python3 agent.py swap ETH USDC 0.01
Stop-Loss & Take-Profit
cd <skill_dir>/scripts && python3 agent.py stop WETH 2000 8.0 0.005
cd <skill_dir>/scripts && python3 agent.py tp WETH 2000 5.0 0.005
cd <skill_dir>/scripts && python3 agent.py monitor
Portfolio
cd <skill_dir>/scripts && python3 agent.py balances
cd <skill_dir>/scripts && python3 agent.py wallet
Risk Management
Configurable risk parameters in config.py (override via trading-config.json):
| Parameter | Default | Description |
|---|---|---|
max_daily_trades | 8 | Max new trades per 24h window |
max_active_positions | 8 | Max concurrent open positions |
trade_size_usd | 20 | Trade size in USD |
take_profit_pct | 5.0 | Auto take-profit trigger |
stop_loss_pct | 8.0 | Auto stop-loss trigger |
max_drawdown_pct | 20.0 | Portfolio-wide drawdown halt |
cooldown_minutes | 60 | Cooldown between same-token trades |
min_liquidity | 50000 | Minimum pool liquidity (USD) |
min_volume_24h | 100000 | Minimum 24h volume filter |
Key design decision: max_daily_trades should match max_active_positions. A mismatch (e.g., 4 daily trades but 8 position slots) means the bot hits its daily cap before filling available positions — leaving capital idle while signals pass. Align both limits for maximum capital efficiency.
Supported Chains
- Base (Chain ID 8453)
Supported DEXes
- Uniswap V3
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-avmw2025-dex-agent": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Amazon Fee Calculator
Skill by avmw2025
Amazon Listing Optimizer
Skill by avmw2025
defi-trading-engine
DeFi Trading Engine - Autonomous DeFi trading bot with self-improving review system for OpenClaw agents. Use when setting up DeFi trading, crypto trading bot, automated trading, Base chain trading, Bankr integration, trading engine, self-improving bot, or trading strategy execution.
shopify-theme-pro
Shopify Theme Development Pro - Complete theme development, deployment, and design system management for OpenClaw agents. Use when building Shopify themes, writing Liquid templates, pushing theme changes, deploying to stores, or managing design systems. Triggers on Shopify theme, Liquid templating, theme development, theme deployment, push theme, Shopify design system, Online Store 2.0, theme sections.
crypto-market-intel
Crypto Market Intelligence - Free market data pipeline for any OpenClaw agent. Zero API keys needed. Fetch real-time crypto prices, market metrics, Fear & Greed index, DeFi TVL, stock indices, and macro indicators. Use when you need crypto prices, market data, market analysis, fear and greed, DeFi TVL, stock prices, macro data, market intelligence, or trading signals.