$npx -y skills add gate/gate-skills --skill gate-dex-marketOn-chain DEX market data queries via Gate: token prices/价格, K-line/OHLC candlestick charts, token rankings, security risk audits, new token discovery, holder analysis, and trading volume stats. Read-only — no transactions. Use when the user asks for 'token price', 'price of ETH',
| 1 | # Gate DEX Market |
| 2 | |
| 3 | > **Pure Routing Layer** — READ-ONLY data queries only. Never executes transactions. All specifications in `references/`. |
| 4 | |
| 5 | ## General Rules |
| 6 | |
| 7 | ⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. |
| 8 | Do NOT select or call any tool until all rules are read. These rules have the highest priority. |
| 9 | → Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) |
| 10 | |
| 11 | **Trigger Scenarios**: Use when the user wants to **look up or analyze** market data without executing any transaction: |
| 12 | - Price lookup: "what is the price of ETH", "check SOL price", "price of 0x1234..." |
| 13 | - Charts: "show K-line", "candlestick chart", "price trend" |
| 14 | - Rankings: "top gainers", "trending tokens", "token rankings" |
| 15 | - Security: "is this token safe", "security audit", "honeypot check", "risk analysis" |
| 16 | - Discovery: "new tokens", "newly listed", "holder analysis", "whale tracking" |
| 17 | - Volume: "trading volume", "buy-sell pressure", "liquidity events" |
| 18 | |
| 19 | ## Project convention — MCP only |
| 20 | |
| 21 | No OpenAPI unless user explicitly asks. MCP setup: see `gate-dex-trade/references/setup.md`. |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | **NOT this skill** (common misroutes): |
| 26 | - "quote for swapping X to Y" → `gate-dex-trade` (swap execution) |
| 27 | - "check my balance" → `gate-dex-wallet` (account query) |
| 28 | - "buy ETH" / "sell USDT" → `gate-dex-trade` (transaction execution) |
| 29 | |
| 30 | --- |
| 31 | |
| 32 | ## Routing Flow |
| 33 | |
| 34 | ```text |
| 35 | User triggers market data query |
| 36 | | |
| 37 | Step 1: OpenAPI only if user explicitly asks. Else MCP only. |
| 38 | Step 2: MCP discovery → success = MCP mode; fail = MCP setup guide (no OpenAPI fallback). |
| 39 | ``` |
| 40 | |
| 41 | --- |
| 42 | |
| 43 | ## Feature Matrix |
| 44 | |
| 45 | | Feature | MCP | OpenAPI | Notes | |
| 46 | |---------|-----|---------|-------| |
| 47 | | K-line / Candlestick | Yes | Yes | | |
| 48 | | Token basic info | Yes | Yes | | |
| 49 | | Token rankings | Yes | Yes | | |
| 50 | | Security risk audit | Yes | Yes | | |
| 51 | | Tradable token list | Yes | Yes | | |
| 52 | | Cross-chain bridge tokens | Yes | No | MCP only | |
| 53 | | Holder analysis (Top N) | No | Yes | OpenAPI only | |
| 54 | | New token discovery | No | Yes | OpenAPI only | |
| 55 | | Liquidity events (Rug Pull) | No | Yes | OpenAPI only | |
| 56 | | Volume stats (multi-period) | No | Yes | OpenAPI only | |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ## Mode Dispatch |
| 61 | |
| 62 | ### MCP Mode |
| 63 | |
| 64 | **Read and strictly follow** [`references/mcp.md`](./references/mcp.md), execute according to its complete workflow. |
| 65 | |
| 66 | Includes: connection detection, 6 market data tools (dex_market_get_kline, dex_token_get_coin_info, dex_token_ranking, dex_token_get_risk_info, dex_token_list_swap_tokens, dex_token_list_cross_chain_bridge_tokens), no authentication required for market queries. |
| 67 | |
| 68 | ### OpenAPI Mode (Progressive Loading) |
| 69 | |
| 70 | Explicit user request only. Load files progressively: |
| 71 | |
| 72 | 1. **Always load first**: [`references/openapi/_shared.md`](./references/openapi/_shared.md) — env detection, credentials, API call method (via helper script) |
| 73 | 2. **Then load based on query type**: |
| 74 | |
| 75 | | Query Type | Load File | |
| 76 | |-----------|-----------| |
| 77 | | Token info, rankings, new tokens, security, holders | [`openapi/token-data.md`](./references/openapi/token-data.md) | |
| 78 | | Volume stats, K-line, liquidity events | [`openapi/market-data.md`](./references/openapi/market-data.md) | |
| 79 | |
| 80 | > Legacy monolithic file preserved at [`references/openapi.md`](./references/openapi.md) for backward compatibility. |
| 81 | |
| 82 | --- |
| 83 | |
| 84 | ## Supported Chains |
| 85 | |
| 86 | Actual supported chains are determined by runtime API/Resource returns: |
| 87 | - **MCP Mode**: via `dex_chain_config` tool |
| 88 | - **OpenAPI Mode**: chain parameter in request |
| 89 | |
| 90 | Common chains: eth, bsc, polygon, arbitrum, optimism, avax, base, sol. |
| 91 | |
| 92 | --- |
| 93 | |
| 94 | ## Security Rules |
| 95 | |
| 96 | 1. **Data objectivity**: Present prices and rankings objectively, no investment advice |
| 97 | 2. **Risk warnings**: Clearly remind users to judge investment risks themselves when showing security audits |
| 98 | 3. **Credential security**: Follow §3 of [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) for auth/credential handling |
| 99 | 4. **Read-only**: All operations are data queries, no on-chain write operations |