gate-cex-trade
Installation
SKILL.md
Gate CEX trading
This is the task-level entry point for Gate CEX requests. It connects a user's intent to the package-local CLI contracts and the shared CLI execution boundary. It is a routing and safety layer; it does not add an unlisted command or turn a similar product into an equivalent one.
Before using a tool
- Read runtime, confirmation and recovery rules, and order workflows, then read the canonical command reference that matches the request. Treat the official Gate API v4 documentation as authoritative for REST paths, request fields, enums, and response semantics. Treat the installed
gate-clisource snapshot as authoritative only for the CLI command and flag surface; run the exact leaf--helpbefore use. Execute registered CLI leaves using their canonical command contract. Only the bounded public market transports listed in market rules are exceptions; do not bypass a missing CLI action with a private HTTP or SDK call. If no compatible local mapping exists, render theworkflows.mdunavailable-operation toast. Trace a suspected mismatch through registration, flag parsing, handler and SDK request construction. Error-label paths alone are not wire-path evidence. Stop only the affected operation when an actual incompatibility or required capability gap is established. Source support does not prove installed-version support, online permission, regional availability or product eligibility. - Resolve the product and instrument. A request such as “buy BTC” is incomplete until spot, margin, futures, options, or another product is known. A read-only candidate lookup may compare CEX pairs and Alpha tokens when the asset is ambiguous; never write until the user chooses. “go long with 500 USDT” is incomplete until the product, settlement currency, amount unit, leverage, margin mode, and position side are known.
- For a read request, use read-only operations and report the source time. For a write request, run only the product-specific preflight in
workflows.md: order writes need rules/balance/position checks as applicable; loan and configuration writes need the current resource state and limits; countdown and account-wide actions need an explicit scope. - Normalize the request using the live product specification: symbol, side, order type, quantity or quote amount, price, time-in-force, reduce-only, trigger rule, settlement currency, leverage, and margin mode. Never silently convert a quote amount to contracts or base quantity.
- Show the product-specific execution summary from
workflows.mdand ask for explicit confirmation immediately before the first write in a sequence when no active confirmation covers the unchanged operation. Include the native quantity/unit, scope, resource fields, estimated fees or margin, and any linked protection order. Reuse the active confirmation for unchanged polling, reconciliation, and declared sequence steps; obtain confirmation again only when the confirmed context changes.