返回顶部
w

web3-trader

DEX swap trading skill. Activates on swap/exchange/sell/buy/convert/DEX/trade token keywords. Queries prices via Antalpha AI DEX aggregator, finds optimal routes, generates transaction data. Supports MetaMask/OKX/Trust/TokenPocket. Zero custody — private keys never leave the user's wallet.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.5
安全检测
已通过
66
下载量
0
收藏
概述
安装方式
版本历史

web3-trader

# Web3 Trader DEX aggregator trading for AI agents. Zero custody, multi-wallet, cyberpunk UI. ## Modes | Mode | Description | Use Case | |------|-------------|----------| | 🌐 **MCP Remote** (recommended) | Antalpha MCP Server handles quotes + page hosting | Production | | 🖥️ **Local CLI** | Python CLI calls 0x API locally | Dev/offline, see `references/local-cli.md` | ## MCP Mode **Server**: `https://mcp-skills.ai.antalpha.com/mcp` | Tool | Description | |------|-------------| | `swap-full` | One-shot: quote + page + host (recommended) | | `swap-quote` | DEX aggregated quote | | `swap-create-page` | Generate + host cyberpunk swap page | | `swap-tokens` | List supported tokens | | `swap-gas` | Current gas price | For detailed MCP workflow and examples, see `references/mcp-mode.md`. ## Agent Workflow ``` User: "Swap 0.1 ETH to USDT" → Agent calls swap-full(sell_token=ETH, buy_token=USDT, sell_amount=0.1, taker=0xWallet) → Agent sends: trade preview + QR code image (one message) → User clicks link / scans QR → wallet signs → on-chain ``` ## Agent Behavior Rules 1. **No filler text** — Only show the trade preview result, no procedural narration 2. **Generate QR code** — From `preview_url`, generate QR PNG with `qrcode` library, send as attachment 3. **One message** — Trade preview text + QR code image in the same message ## Message Template ``` ⚡ <FROM> -> <TO> Swap Preview 📊 <from_amount> <from_token> -> ~<to_amount> <to_token> 💰 Price: 1 <from_token> ≈ $<price> 🛡️ Min Receive: <min_buy_amount> <to_token> ⛓️ Network: Ethereum Mainnet 🛣️ Route: <route_source> (<proportion>) 👛 Wallet: <wallet_short> 🔥 Supported Wallets: MetaMask | OKX Web3 | Trust Wallet | TokenPocket 📱 Click the link or scan QR code to confirm: 🔗 <preview_url> 🤖 Powered by Antalpha AI ``` **Required**: Last line `🤖 Powered by Antalpha AI` must be included. ## Quick Start ```bash cp references/config.example.yaml ~/.web3-trader/config.yaml pip install requests web3 qrcode pillow pyyaml python3 scripts/trader_cli.py price --from ETH --to USDT --amount 0.001 python3 scripts/trader_cli.py swap-page --from ETH --to USDT --amount 0.001 \ --wallet 0xYourWallet -o /tmp/swap.html --json ``` ## CLI Commands | Command | Description | |---------|-------------| | `price --from <t> --to <t> --amount <n>` | Query price | | `route --from <t> --to <t> --amount <n>` | Get optimal route | | `build-tx --from <t> --to <t> --amount <n> --wallet <addr>` | Build transaction | | `export --from <t> --to <t> --amount <n> --wallet <addr>` | Export EIP-681 link | | `swap-page --from <t> --to <t> --amount <n> --wallet <addr> -o <file>` | Generate swap page | | `gas` | Gas price | | `tokens` | List tokens | All commands support `--json`. ## Supported Assets **Tokens**: USDT, USDC, DAI, ETH, WETH, WBTC, LINK, UNI (Ethereum Mainnet) **Wallets**: MetaMask, OKX Web3, Trust Wallet, TokenPocket ## Security | Layer | Protection | |-------|-----------| | Private Keys | Zero contact — never held, transmitted, or stored | | Transaction Data | 0x Protocol with MEV protection | | Slippage | Configurable max (default 0.5%), `minBuyAmount` on-chain enforced | | Review | User sees full details in wallet before signing | | Hosted Page | Self-contained HTML, no backend, no cookies, no tracking |

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 web3-trader-1775967363 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 web3-trader-1775967363 技能

通过命令行安装

skillhub install web3-trader-1775967363

下载 Zip 包

⬇ 下载 web3-trader v1.0.5

文件大小: 24.06 KB | 发布时间: 2026-4-13 12:33

v1.0.5 最新 2026-4-13 12:33
- Improved SKILL.md documentation with detailed descriptions, agent workflow, and message templates.
- Clarified supported wallets and listed all supported tokens for Ethereum Mainnet.
- Added security notes highlighting zero-custody design and user protections.
- Expanded CLI command documentation, including example usage and available options.
- Provided guidance for both remote (MCP) and local CLI operation modes.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部