Loading...
Loading...
Gate DEX trading comprehensive skill. Supports MCP and OpenAPI dual modes: MCP mode calls through gate-wallet service (requires authentication), OpenAPI mode calls directly through AK/SK. Use when users mention swap, exchange, buy, sell, quote, trade. Automatically select the most suitable calling method based on environment.
npx skill4agent add gate/gate-skills gate-dex-tradeTrading Comprehensive Skill — MCP + OpenAPI dual mode support, intelligent routing selects optimal trading method
| Mode | Connection Method | Advantages | Use Cases |
|---|---|---|---|
| 🔗 MCP Mode | gate-wallet MCP Server | Unified authentication, wallet ecosystem integration | Complete trading process, cross-Skill collaboration |
| ⚡ OpenAPI Mode | AK/SK direct calls | Independent execution, complete lifecycle | Fast trading, full chain control |
| Priority | Condition | Selected Mode | Routing Target |
|---|---|---|---|
| 1 | Explicitly mentions "OpenAPI", "AK/SK" | ⚡ OpenAPI | |
| 2 | Exists | ⚡ OpenAPI | |
| 3 | From wallet Skills cross-Skill calls | 🔗 MCP | Current SKILL.md main process |
| 4 | Default scenario | 🔗 MCP | Current SKILL.md main process |
CallMcpTool(server="gate-wallet", toolName="chain.config", arguments={chain: "eth"})| Result | Handling |
|---|---|
| Success | MCP Server available, subsequent operations directly call business tools, no need to probe again |
| Failure | Display configuration guidance based on error type (see error handling below) |
| Error Type | Keywords | Handling |
|---|---|---|
| MCP Server not configured | | Display MCP Server configuration guidance |
| Remote service unreachable | | Prompt to check server status and network connection |
| Authentication failed | | Prompt to contact administrator for API Key |
mcp_tokenmcp_tokengate-dex-wallet/references/authmcp_tokenauth.refresh_tokentx.quote| Field | Description |
|---|---|
| Tool Name | |
| Parameters | |
| Return | Quote details including exchange rate, slippage, routing path, estimated Gas etc |
tx.swap| Field | Description |
|---|---|
| Tool Name | |
| Parameters | Same as |
| Return | Transaction result |
tx.swap_detail| Routing Condition | Target | Description |
|---|---|---|
| OpenAPI environment + related intent | references/openapi.md | Complete OpenAPI call specification |
| MCP environment + trading intent | Current SKILL.md main process | MCP tool calls and three-step confirmation process |
First session detection (if needed)
↓
Environment detection:
1. Check ~/.gate-dex-openapi/config.json
2. Check gate-wallet MCP Server
↓
Select calling mode based on detection result:
→ OpenAPI mode: references/openapi.md
→ MCP mode: Current main processAuthentication check → Balance verification → Trading pair confirmation
→ tx.quote → Quote display → Signature authorization confirmation
→ tx.swap → tx.swap_detail| Caller | Scenario | Tool Used |
|---|---|---|
| User views balance then wants to exchange tokens | MCP mode call |
| User views market then wants to buy certain token | MCP mode call |
| Chain ID | Network Name | MCP Support | OpenAPI Support |
|---|---|---|---|
| Ethereum | ✅ | ✅ |
| BNB Smart Chain | ✅ | ✅ |
| Polygon | ✅ | ✅ |
| Arbitrum One | ✅ | ✅ |
| Optimism | ✅ | ✅ |
| Avalanche | ✅ | ✅ |
| Base | ✅ | ✅ |
| Solana | ✅ | ✅ |
mcp_token