DEX Agent
/install dex-agent
DEX 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 \x3Cskill_dir>/scripts && python3 agent.py price WETH
cd \x3Cskill_dir>/scripts && python3 agent.py price BRETT
Get Quote
cd \x3Cskill_dir>/scripts && python3 agent.py quote USDC WETH 10.0
Execute Swap
cd \x3Cskill_dir>/scripts && python3 agent.py swap USDC WETH 5.0
cd \x3Cskill_dir>/scripts && python3 agent.py swap ETH USDC 0.01
Stop-Loss & Take-Profit
cd \x3Cskill_dir>/scripts && python3 agent.py stop WETH 2000 8.0 0.005
cd \x3Cskill_dir>/scripts && python3 agent.py tp WETH 2000 5.0 0.005
cd \x3Cskill_dir>/scripts && python3 agent.py monitor
Portfolio
cd \x3Cskill_dir>/scripts && python3 agent.py balances
cd \x3Cskill_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
Key Advantages Over Bankr
- Zero swap fees (just gas costs)
- Free stop-loss and take-profit (no subscription needed)
- Self-custodial (you hold your private keys)
- Faster execution (~3s vs ~20s)
- Configurable risk management (daily limits, position caps, drawdown protection)
- Open source and customizable
Safety Notes
- Private keys are stored locally and never transmitted
- Always use slippage protection (default: 1%)
- Start with small amounts to test
- Risk parameters prevent overexposure — don't disable them
- This is NOT financial advice
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install dex-agent - 安装完成后,直接呼叫该 Skill 的名称或使用
/dex-agent触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
DEX Agent 是什么?
Execute zero-fee direct token swaps and manage stop-loss, take-profit, and portfolio tracking on Base chain via Uniswap V3 with self-custodial security. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 288 次。
如何安装 DEX Agent?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install dex-agent」即可一键安装,无需额外配置。
DEX Agent 是免费的吗?
是的,DEX Agent 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
DEX Agent 支持哪些平台?
DEX Agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 DEX Agent?
由 Elway Botty(@avmw2025)开发并维护,当前版本 v1.1.0。