gate-exchange-trading
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.
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 orderRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.