$npx -y skills add gate/gate-skills --skill gate-exchange-crossexGate CrossEx cross-exchange skill. Use when the user asks to trade or query positions across Gate, Binance, OKX, and Bybit simultaneously. Triggers on 'cross exchange', 'Binance order', 'OKX position'.
| 1 | ### Resolving `gate-cli` (binary path) |
| 2 | |
| 3 | Resolve **`gate-cli`** in order: **(1)** **`command -v gate-cli`** and **`gate-cli --version`** succeeds; **(2)** **`${HOME}/.local/bin/gate-cli`** if executable; **(3)** **`${HOME}/.openclaw/skills/bin/gate-cli`** if executable. Canonical rules: [`exchange-runtime-rules.md`](https://github.com/gate/gate-skills/blob/master/skills/exchange-runtime-rules.md) §4 (or [`gate-runtime-rules.md`](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) §4). |
| 4 | |
| 5 | |
| 6 | # Gate CrossEx Trading Suite |
| 7 | |
| 8 | This skill is the unified entry point for Gate CrossEx cross-exchange trading. It supports lots of **core operations**: |
| 9 | order management, position query, and history query. User intents are routed to corresponding workflows. |
| 10 | |
| 11 | ## General Rules |
| 12 | |
| 13 | ⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. |
| 14 | Do NOT select or call any tool until all rules are read. These rules have the highest priority. |
| 15 | → Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) |
| 16 | - **Only use the `gate-cli` commands explicitly listed in this skill.** Commands not documented here must NOT be run for these workflows, even if other interfaces expose them. |
| 17 | |
| 18 | ## Skill Dependencies |
| 19 | |
| 20 | |
| 21 | ### gate-cli commands used |
| 22 | |
| 23 | **Query Operations (Read-only)** |
| 24 | |
| 25 | - `gate-cli cex cross-ex account get` |
| 26 | - `gate-cli cex cross-ex market fee` |
| 27 | - `gate-cli cex cross-ex market interest-rate` |
| 28 | - `gate-cli cex cross-ex position margin-leverage` |
| 29 | - `gate-cli cex cross-ex order get` |
| 30 | - `gate-cli cex cross-ex position leverage` |
| 31 | - `gate-cli cex cross-ex account book` |
| 32 | - `gate-cli cex cross-ex position adl-rank` |
| 33 | - `gate-cli cex cross-ex market discount-rate` |
| 34 | - `gate-cli cex cross-ex position margin-interests` |
| 35 | - `gate-cli cex cross-ex position margin-history` |
| 36 | - `gate-cli cex cross-ex order history` |
| 37 | - `gate-cli cex cross-ex position history` |
| 38 | - `gate-cli cex cross-ex order trades` |
| 39 | - `gate-cli cex cross-ex position margin-list` |
| 40 | - `gate-cli cex cross-ex order list` |
| 41 | - `gate-cli cex cross-ex position list` |
| 42 | - `gate-cli cex cross-ex market risk-limits` |
| 43 | - `gate-cli cex cross-ex market symbols` |
| 44 | - `gate-cli cex cross-ex market transfer-coins` |
| 45 | - `gate-cli cex cross-ex transfer list` |
| 46 | |
| 47 | **Execution Operations (Write)** |
| 48 | |
| 49 | - `gate-cli cex cross-ex order cancel` |
| 50 | - `gate-cli cex cross-ex position close` |
| 51 | - `gate-cli cex cross-ex convert create` |
| 52 | - `gate-cli cex cross-ex convert quote` |
| 53 | - `gate-cli cex cross-ex order create` |
| 54 | - `gate-cli cex cross-ex transfer create` |
| 55 | - `gate-cli cex cross-ex account update` |
| 56 | - `gate-cli cex cross-ex position set-margin-leverage` |
| 57 | - `gate-cli cex cross-ex order update` |
| 58 | - `gate-cli cex cross-ex position set-leverage` |
| 59 | |
| 60 | ### Authentication |
| 61 | - **Interactive file setup:** when **`GATE_API_KEY`** and **`GATE_API_SECRET`** are **not** both set on the host, run **`gate-cli config init`** to complete the wizard for API key, secret, profiles, and defaults (see [gate-cli](https://github.com/gate/gate-cli)). |
| 62 | - **Env / flags:** **`gate-cli config init`** is **not** required when credentials are already supplied — e.g. **both** **`GATE_API_KEY`** and **`GATE_API_SECRET`** set on the host, or **`--api-key`** / **`--api-secret`** where supported — never ask the user to paste secrets into chat. |
| 63 | - **Permissions:** Crx:Write |
| 64 | - **Portal:** create or rotate keys outside the chat: https://www.gate.c |