Claude
Skills
Sign in
Back

gate-exchange-trading

Included with Lifetime
$97 forever

Gate Trading L2. Use when the user wants to execute complex trades, margin borrowing, or query positions and open orders. Triggers on 'market buy', 'margin borrow', 'TradFi', 'Alpha', or spot-plus-futures combos. Requires Action Draft.

General

What this skill does


### Resolving `gate-cli` (binary path)

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).


# Gate Exchange Trading

This is an **L2 composite skill** for users who want a single skill to complete the full trading loop:

`judge the opportunity -> control risk -> produce order draft -> explicit confirmation -> execute -> verify/manage`

It is neither a pure research skill nor a pure execution skill. Its purpose is to provide a complete trading workflow inside one skill.

## General Rules

⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding.
Do NOT select or call any tool until all rules are read. These rules have the highest priority.
→ Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md)
- **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.

Before calling any named MCP tool, verify that the concrete tool name exists in the current runtime tool list. If a helper tool is absent, disclose the mismatch, use only the nearest valid fallback combination, and do not overclaim unavailable coverage such as rankings, macro breadth, or automated fund-flow tracing.

Also validate that the returned payload is rich enough for the intended analytical claim. If a tool returns sparse metadata, empty structures, or requires missing disambiguation inputs, treat it as supporting context only rather than primary evidence.

For portability across hosts, treat the documented `gate-cli cex …` commands as the baseline:

- `info_*` -> Gate Info MCP
- `news_feed_*` -> Gate News MCP
- read-only spot/futures market data -> `gate-cli cex spot market …` / `gate-cli cex futures market …` (public endpoints where applicable)
- private order / account / position flows -> authenticated `gate-cli` (**`GATE_API_KEY`** / **`GATE_API_SECRET`** and/or **`gate-cli config init`**; when **both** env vars are set on the host, **`config init`** is not required)

Do not make `news_events_*` a required dependency in scenario design, because it is not part of the documented baseline news surface.

## Execution mode

**Read and strictly follow** [`references/gate-cli.md`](./references/gate-cli.md), then execute this skill's trading workflow.

- `SKILL.md` keeps composite routing, trade lifecycle policy, and guardrails.
- `references/gate-cli.md` is the authoritative `gate-cli` orchestration contract for cross-domain tool sequencing, execution gates, and degradation.

---

Read `references/scenarios.md` for:

- representative user scenarios
- representative prompt examples
- expected tool-routing patterns

## Authentication

- **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)).
- **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.
- API Key Required: Not always
- Read-only analysis: public `info_*`, `news_feed_*`, and some public `gate-cli cex spot market …` / `gate-cli cex futures market …` reads may work without authentication, depending on endpoint
- Execution and private account actions: Yes, authenticated Exchange MCP tools with the required API key permissions are mandatory
- Note: Do not block analysis-only use just because private execution tools are unavailable; only block when the requested action needs private trading/account access.

### Installation Check

- **Required:** `gate-cli` (install from [gate-cli releases](https://github.com/gate/gate-cli/releases) or via your environment’s Gate MCP / skills installer).
- Add the directory containing **`gate-cli`** to **`PATH`** when invoking by name.
- **Credentials:** When **`GATE_API_KEY`** and **`GATE_API_SECRET`** are both set (non-empty) for the host, **do not** require **`gate-cli config init`**. When **both** are unset or empty and private execution is needed, **remind** the operator to run **`gate-cli config init`** **or** to configure **`GATE_API_KEY`** / **`GATE_API_SECRET`** in the **matching skill** from the skill library (never ask the user to paste secrets into chat).
- **Sanity check:** Confirm the CLI works (e.g. **`gate-cli --version`** or a public **`gate-cli cex spot market …`** / **`gate-cli cex futures market …`** read) before private trading steps.

## Positioning

- For users who want to trade without switching across multiple skills
- Self-contained: can be installed alone and still understand both analysis and execution mapping
- Supports **spot trading** and **USDT perpetual futures**
- Supports post-trade **amend / cancel / close / verification**

## Suitable Scenarios

### Suitable

- The user already has a target asset and wants analysis before trading
  - `Check whether BTC is worth buying now, then give me a spot order draft`
  - `I want to long ETH, but check momentum, liquidation, and liquidity first`
- The user is triggered by news, abnormal moves, or new listings and wants to trade after analysis
  - `ETH just dumped. Explain why and tell me whether it is worth buying`
  - `This newly listed coin looks interesting. Check the risk before giving me a starter trade plan`
- The user already placed an order or opened a position and now wants management
  - `Raise my unfilled buy order by 1%`
  - `Close half of my BTC position`

### Not Suitable

- Pure market research with no trading goal
- Options, Alpha trading, on-chain swap, DeFi execution, copy trading, wealth products
- Fully automatic trading, skipping confirmation, bypassing compliance or risk controls

## Capability Boundary

### This skill can do

1. Recognize whether the user wants:
   - pre-trade judgment
   - judgment plus execution
   - order / position management
2. Dynamically combine analysis modules around one trade target:
   - market/news context
   - single-coin analysis
   - technical analysis
   - liquidity/slippage/liquidation/order-book analysis
   - token or contract risk check
3. Produce a **Trading Brief**
4. Produce an **Order Draft** when risk is acceptable
5. Execute after explicit confirmation:
   - spot buy/sell, conditional limit logic, amend/cancel/verification
   - USDT perpetual open/close/reverse/amend/cancel
6. Continue after execution:
   - fill verification
   - position verification
   - order / position management

### This skill cannot do

1. Decide and trade automatically on behalf of the user
2. Place orders without explicit confirmation
3. Bypass compliance, risk, minimum order, or contract safety constraints
4. Promise profit or present analysis as certainty
5. Pretend to support unsupported products

## Operating Principles

### Principle 1: Work around the trading goal

This skill is built for trading closure, not broad research.

- If the user only asks `How is the market?`
  - a lightweight market scan is fine
  - do not proactively move into order execution
- If the user says `How is the market today? Give me one trade idea`
  - a lightweight scan is allowed
  - but the workflow must narrow down to **one asset + one market (spot or futures)** before entering execution

### Principle 2: Judge first, execute second

Unless the user only wants pure order
Files: 10
Size: 71.2 KB
Complexity: 58/100
Category: General

Related in General