1---2name: gate-exchange-crossex3version: "2026.3.23-1"4updated: "2026-03-23"5description: 'Use this skill for Gate CrossEx cross-exchange operations: order placement, transfer, convert, and order/position/history queries across Gate, Binance, OKX and Bybit. Trigger phrases include "buy spot", "transfer", "convert", "query positions", "order history".'6metadata:7 source: https://skillmd.com/skills/leoyeai-openclaw-master-skills/gate-exchange-crossex8---910# Gate CrossEx Trading Suite1112This skill is the unified entry point for Gate CrossEx cross-exchange trading. It supports lots of **core operations**:13order management, position query, and history query. User intents are routed to corresponding workflows.1415## General Rules1617⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding.18Do NOT select or call any tool until all rules are read. These rules have the highest priority.19→ Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md)20- **Only call MCP tools explicitly listed in this skill.** Tools not documented here must NOT be called, even if they21 exist in the MCP server.222324---2526## MCP Dependencies2728### Required MCP Servers29| MCP Server | Status |30|------------|--------|31| Gate (main) | ✅ Required |3233### MCP Tools Used3435**Query Operations (Read-only)**3637- cex_crx_get_crx_account38- cex_crx_get_crx_fee39- cex_crx_get_crx_interest_rate40- cex_crx_get_crx_margin_positions_leverage41- cex_crx_get_crx_order42- cex_crx_get_crx_positions_leverage43- cex_crx_list_crx_account_book44- cex_crx_list_crx_adl_rank45- cex_crx_list_crx_coin_discount_rate46- cex_crx_list_crx_history_margin_interests47- cex_crx_list_crx_history_margin_positions48- cex_crx_list_crx_history_orders49- cex_crx_list_crx_history_positions50- cex_crx_list_crx_history_trades51- cex_crx_list_crx_margin_positions52- cex_crx_list_crx_open_orders53- cex_crx_list_crx_positions54- cex_crx_list_crx_rule_risk_limits55- cex_crx_list_crx_rule_symbols56- cex_crx_list_crx_transfer_coins57- cex_crx_list_crx_transfers5859**Execution Operations (Write)**6061- cex_crx_cancel_crx_order62- cex_crx_close_crx_position63- cex_crx_create_crx_convert_order64- cex_crx_create_crx_convert_quote65- cex_crx_create_crx_order66- cex_crx_create_crx_transfer67- cex_crx_update_crx_account68- cex_crx_update_crx_margin_positions_leverage69- cex_crx_update_crx_order70- cex_crx_update_crx_positions_leverage7172### Authentication73- API Key Required: Yes (see skill doc/runtime MCP deployment)74- Permissions: Crx:Write75- Get API Key: https://www.gate.io/myaccount/profile/api-key/manage7677### Installation Check78- Required: Gate (main)79- Install: Run installer skill for your IDE80 - Cursor: `gate-mcp-cursor-installer`81 - Codex: `gate-mcp-codex-installer`82 - Claude: `gate-mcp-claude-installer`83 - OpenClaw: `gate-mcp-openclaw-installer`8485## Module Overview8687| Module | Description | Trigger Keywords |88|---------------|-------------------------------------------------------------------------|-------------------------------------------------------------------------------|89| **Spot** | Limit/market buy/sell, cross-exchange arbitrage | `spot buy`, `spot sell`, `buy spot`, `sell spot` |90| **Margin** | Long/short trading, margin management, auto-borrowing | `margin long`, `margin short`, `long margin`, `short margin` |91| **Futures** | USDT perpetual contracts, dual-direction positions, leverage adjustment | `futures long`, `futures short`, `open long`, `open short` |92| **Transfer** | Cross-exchange fund transfer | `fund transfer`, `cross-exchange transfer`, `transfer`, `move funds` |93| **Convert** | Flash convert and conversion quote workflow | `convert trading`, `flash convert`, `convert`, `quote convert` |94| **Orders** | Query, cancel, amend orders, order history | `query orders`, `cancel order`, `amend order`, `order history`, `list orders` |95| **Positions** | Query all position types, history records | `query positions`, `check positions`, `position history`, `positions` |96| **History** | Query order/position/trade/interest history | `history query`, `trade history`, `interest history`, `history` |9798## Routing Rules99100| Intent | Example Phrases | Route To |101|-----------------------------|----------------------------------------------------------------------------------------------|---------------------------------------------|102| **Spot Trading** | "Buy 100 USDT worth of BTC", "Sell 0.5 BTC", "Market buy ETH spot" | Read `references/spot-trading.md` |103| **Margin Trading** | "Long 50 USDT worth of XRP on margin", "Short BTC on margin", "10x leverage long" | Read `references/margin-trading.md` |104| **Futures Trading** | "Open 1 BTC futures long position", "Market short ETH", "Adjust leverage to 20x" | Read `references/futures-trading.md` |105| **Cross-Exchange Transfer** | "Transfer 100 USDT from Gate to Binance", "Move ETH from OKX to Gate" | Read `references/transfer.md` |106| **Convert Trading** | "Flash convert 10 USDT to BTC", "Convert 50 USDT to ETH on Gate" | Read `references/convert-trading.md` |107| **Order Management** | "Query all open orders", "Cancel that buy order", "Amend order price", "Query order history" | Read `references/order-management.md` |108| **Position Query** | "Query all my positions", "Show futures positions", "Position history" | Read `references/position-query.md` |109| **History Query** | "Query trade history", "Position history", "Margin interest history", "Account ledger" | Read `references/history-query.md` |110| **Unclear** | "Show account" , "Help me" , "Please Check my account" | **Clarify**: Query account, then guide user |111112## MCP Tools113114This skill uses the **CrossEx MCP toolset** with the cex_crx prefix as its only core tool family.115116**Scope rule**: Only execute operations explicitly documented in this skill. Only call tools listed in the tables below117or in `references/*.md`. Tools or operations not mentioned here must not be called.118119### Tool Naming Convention120121- List operations in the cex_crx family query symbols, orders, positions, transfers, or history122- Get operations in the cex_crx family query a single account setting, fee, rate, or order detail123- Create operations in the cex_crx family create an order, transfer, convert quote, or convert order124- Update operations in the cex_crx family update account settings, leverage, or existing orders125- Cancel operations in the cex_crx family cancel an existing order126- Close operations in the cex_crx family close an existing position127128### Symbol And Rule Tools129130| Tool | Purpose |131|---------------------------------------|--------------------------------------------|132| `cex_crx_list_crx_rule_symbols` | List supported CrossEx trading symbols |133| `cex_crx_list_crx_rule_risk_limits` | Query symbol risk limit rules |134| `cex_crx_list_crx_transfer_coins` | List assets supported for CrossEx transfer |135| `cex_crx_get_crx_fee` | Query CrossEx trading fee information |136| `cex_crx_get_crx_interest_rate` | Query CrossEx interest rates |137| `cex_crx_list_crx_coin_discount_rate` | Query collateral discount rates |138139### Account Tools140141| Tool | Purpose |142|---------------------------------|---------------------------------------------|143| `cex_crx_get_crx_account` | Query CrossEx account overview and balances |144| `cex_crx_update_crx_account` | Update CrossEx account settings |145| `cex_crx_list_crx_account_book` | Query CrossEx account ledger entries |146147### Transfer And Convert Tools148149| Tool | Purpose |150|------------------------------------|----------------------------------|151| `cex_crx_list_crx_transfers` | Query transfer history |152| `cex_crx_create_crx_transfer` | Create a cross-exchange transfer |153| `cex_crx_create_crx_convert_quote` | Get a flash convert quote |154| `cex_crx_create_crx_convert_order` | Execute a flash convert order |155156### Order Tools157158| Tool | Purpose |159|-----------------------------------|---------------------------|160| `cex_crx_list_crx_open_orders` | Query current open orders |161| `cex_crx_create_crx_order` | Create a CrossEx order |162| `cex_crx_get_crx_order` | Query order details |163| `cex_crx_update_crx_order` | Amend an existing order |164| `cex_crx_cancel_crx_order` | Cancel a single order |165| `cex_crx_list_crx_history_orders` | Query order history |166| `cex_crx_list_crx_history_trades` | Query trade history |167168### Position And Leverage Tools169170| Tool | Purpose |171|------------------------------------------------|------------------------------------|172| `cex_crx_list_crx_positions` | Query current futures positions |173| `cex_crx_list_crx_margin_positions` | Query current margin positions |174| `cex_crx_close_crx_position` | Close an existing CrossEx position |175| `cex_crx_get_crx_positions_leverage` | Query futures leverage settings |176| `cex_crx_update_crx_positions_leverage` | Update futures leverage |177| `cex_crx_get_crx_margin_positions_leverage` | Query margin leverage settings |178| `cex_crx_update_crx_margin_positions_leverage` | Update margin leverage |179| `cex_crx_list_crx_history_positions` | Query futures position history |180| `cex_crx_list_crx_history_margin_positions` | Query margin position history |181| `cex_crx_list_crx_history_margin_interests` | Query margin interest history |182| `cex_crx_list_crx_adl_rank` | Query ADL rank information |183184### Usage Guidance185186- Use the cex_crx MCP family as the default and only core MCP family for this skill.187- Use list/get tools to query symbol rules, fees, balances, leverage, or supported assets.188- Prefer history and account-book tools when the user asks for records, audit trails, or status verification.189190## Execution191192### 1. Intent and Parameter Identification193194- Determine module (orders/positions/history)195- Extract key parameters:196 - **Trading Pair**: `GATE_SPOT_BTC_USDT`, `GATE_MARGIN_XRP_USDT`, `GATE_FUTURE_ETH_USDT`197 - **Exchange**: `GATE`, `BINANCE`, `OKX`, `BYBIT`198 - **Direction**: `BUY` (buy/long), `SELL` (sell/short)199 - **Quantity**: USDT amount, coin quantity, contract size200 - **Price**: Limit, market201 - **Leverage**: Leverage multiplier (margin/futures only)202 - **Position Side**: `LONG` (long), `SHORT` (short, margin/futures only)203- **Missing Parameters**: If required parameters are missing, ask user204205### 2. Pre-checks206207- **Trading Pair**: Call `cex_crx_list_crx_rule_symbols` to verify208- **Account Balance**: Call `cex_crx_get_crx_account` to check if available margin is sufficient209- **Position Check**:210 - Margin Trading: Check existing positions to avoid direction conflicts211 - Futures Trading: Check dual-direction position mode212- **Minimum Amount**: Query `min_quote_amount` (typically 3 USDT)213- **Exchange Status**: Verify target exchange is operating normally214215### 3. Module Logic216217#### Module A: Spot Trading2182191. **Parameter Confirmation**:220 - Trading pair format: `GATE_SPOT_{BASE}_{QUOTE}`221 - Buy parameters: `quote_qty` (USDT amount)222 - Sell parameters: `qty` (coin quantity)2232. **Minimum Amount Check**: Call `cex_crx_list_crx_rule_symbols` to query minimum amount2243. **Pre-order Confirmation**: Display order summary (pair, direction, quantity, price), require user confirmation2254. **Place Order**: Call `cex_crx_create_crx_order`2265. **Verification**: Call `cex_crx_get_crx_order` to confirm order status227228#### Module B: Margin Trading2292301. **Parameter Confirmation**:231 - Trading pair format: `GATE_MARGIN_{BASE}_{QUOTE}`232 - Required parameters: `qty` (coin quantity), `position_side` (`LONG` or `SHORT`)233 - Optional parameters: `quote_qty` (USDT amount)2342. **Leverage Check**: Query current leverage, adjust if user specifies2353. **Position Direction**:236 - Long (`LONG`): Buy coin, borrow USDT237 - Short (`SHORT`): Sell coin, borrow coin2384. **Minimum Amount Check**: Call `cex_crx_list_crx_rule_symbols` to query minimum amount2395. **Pre-order Confirmation**: Display order summary (pair, direction, quantity, leverage), require confirmation2406. **Place Order**: Call `cex_crx_create_crx_order` with parameter `position_side`2417. **Verification**: Call `cex_crx_list_crx_margin_positions` with a `symbol` filter to confirm position242243#### Module C: Futures Trading2442451. **Parameter Confirmation**:246 - Trading pair format: `GATE_FUTURE_{BASE}_{QUOTE}`247 - Required parameters: `qty` (contract size), `position_side` (`LONG` or `SHORT`)2482. **Leverage Adjustment**: If user specifies leverage, call `cex_crx_get_crx_positions_leverage` and249 `cex_crx_update_crx_positions_leverage`2503. **Contract Size Calculation** (if ordering by value):251 - Get `quanto_multiplier` and current price252 - Round down to ensure overspending is avoided2534. **Minimum Size Check**: Call `cex_crx_list_crx_rule_symbols` to query minimum size2545. **Pre-order Confirmation**: Display order summary (pair, direction, size, leverage), require confirmation2556. **Place Order**: Call `cex_crx_create_crx_order` with parameter `position_side`2567. **Verification**: Call `cex_crx_list_crx_positions` with a `symbol` filter to confirm position257258#### Module D: Cross-Exchange Transfer2592601. **Transfer Type**:261 - Cross-exchange transfer: `cex_crx_create_crx_transfer` (Exchange A -> Exchange B)2622. **Parameter Confirmation**:263 - Cross-exchange transfer: `from`, `to`, `coin`, `amount`264 - **From/To Account Rules**:265 | Coin | Mode | Valid `from` / `to` | Defaults |266 |------|------|--------------------|---------|267 | USDT | Cross-Exchange | `SPOT` ↔ `CROSSEX` | `CROSSEX_{exchange_type}` → `CROSSEX` |268 | USDT | Sub-Exchange | `SPOT` ↔ `CROSSEX_{exchange_type}` or `CROSSEX_{exchange_type}` ↔ `CROSSEX_{exchange_type}` | `CROSSEX` → `CROSSEX_GATE` |269 | Non-USDT | Any | Must use `CROSSEX_{exchange_type}` (never `CROSSEX` alone). Cross-exchange transfers allowed (e.g., `CROSSEX_BINANCE` ↔ `CROSSEX_GATE`). | — |2703. **Supported Coin Check**: Call `cex_crx_list_crx_transfer_coins` to verify2714. **Balance Check**: Confirm source account has sufficient balance2725. **Pre-transfer Confirmation**: Display transfer summary (source, destination, coin, quantity), require confirmation2736. **Execute Transfer**: Call `cex_crx_create_crx_transfer`2747. **Verification**: Call `cex_crx_list_crx_transfers` to query transfer history and confirm275276#### Module E: Convert Trading2772781. **Convert Type**:279 - Flash convert quote: `cex_crx_create_crx_convert_quote`280 - Flash convert execution: `cex_crx_create_crx_convert_order`2812. **Parameter Confirmation**:282 - Flash convert: `from_coin`, `to_coin`, `from_amount`, `exchange_type`2833. **Balance Check**: Confirm source account has sufficient balance for the convert pair2844. **Pre-convert Confirmation**: Display source asset, target asset, rate, and expected receive amount, then require285 confirmation2865. **Quote**: Call `cex_crx_create_crx_convert_quote`2876. **Execute Convert**: Call `cex_crx_create_crx_convert_order` with the returned `quote_id`2887. **Verification**: Call `cex_crx_get_crx_account` to confirm resulting balances289290#### Module F: Order Management2912921. **Query Orders**:293 - Current open orders: Call `cex_crx_list_crx_open_orders`294 - Order details: Call `cex_crx_get_crx_order`295 - **Order History**: Call `cex_crx_list_crx_history_orders` (parameters: limit, page, from, to)2962. **Cancel Orders**:297 - Single cancel: Call `cex_crx_cancel_crx_order`2983. **Amend Orders**:299 - Check order status must be `open`300 - Call `cex_crx_update_crx_order` to amend price or quantity3014. **Display Results**: Display order information in table format302303#### Module G: Position Query3043051. **Query Types**:306 - Futures positions: Call `cex_crx_list_crx_positions`307 - Margin positions: Call `cex_crx_list_crx_margin_positions`308 - Futures leverage: Call `cex_crx_get_crx_positions_leverage`309 - Margin leverage: Call `cex_crx_get_crx_margin_positions_leverage`3102. **History Query**:311 - **Position History**: Call `cex_crx_list_crx_history_positions` (parameters: limit, page, from, to)312 - **Margin Position History**: Call `cex_crx_list_crx_history_margin_positions`313 - **Trade History**: Call `cex_crx_list_crx_history_trades` (parameters: limit, page, from, to)3143. **Display Format**:315 - Current positions: Table format (pair, direction, quantity, entry price, unrealized PnL)316 - History records: Reverse chronological order, display recent N records317318#### Module H: History Query3193201. **Order History**:321 - Call `cex_crx_list_crx_history_orders`322 - Parameters: `limit` (max 100), `page`, `from` (start timestamp), `to` (end timestamp)3232. **Trade History**:324 - Call `cex_crx_list_crx_history_trades`325 - Same parameters as above3263. **Position History**:327 - Call `cex_crx_list_crx_history_positions`328 - Same parameters as above3294. **Margin Position History**:330 - Call `cex_crx_list_crx_history_margin_positions`331 - Same parameters as above3325. **Margin Interest History**:333 - Call `cex_crx_list_crx_history_margin_interests`334 - Same parameters as above335336## Report Template337338After each operation, output a concise standardized result.339340## Safety Rules341342- **Credentials**: Never prompt or induce the user to paste API Secret Key into chat; prefer secure local MCP configuration.343- **User-to-User Transfer**: This skill does not support P2P or user-to-user transfers; only transfers between the user's own accounts (e.g., SPOT ↔ CROSSEX) are allowed.344- **Trade Orders**: Display complete order summary (pair, direction, quantity, price, leverage), require user345 confirmation before placing order346- **Cross-Exchange Transfer**: Display transfer details (source, destination, quantity, arrival time), require347 confirmation348- **Scope rule**: Only call tools documented in this skill. If the user requests an operation not documented here,349 respond that it is not supported by this skill.350- **Batch Operations**: Display operation scope and impact, require explicit confirmation351352Example: *"Reply 'confirm' to execute the above operation."*353354## Error Handling355356| Error Code | Handling |357|----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|358| `USER_NOT_EXIST` | Please confirm if a GATE CrossEx account has been opened. Refer to the GATE Help Center -> CrossEx Trading -> CrossEx Account Operation Guide for instructions. |359| `TRADE_INVALID_QUOTE_ORDER_QTY` | ⚠️ Incorrect parameter name: Market buy must use `quote_qty` |360| `TRADE_INVALID_ORDER_QTY` | ⚠️ Limit order error: Limit orders must use `qty` (coin quantity) + `price` |361| `TRADE_ORDER_AMOUNT_MIN_ERROR` | Order amount below minimum notional value (typically 3 USDT), increase quantity or amount |362| `CONVERT_TRADE_QUOTE_EXCHANGE_INVALID_ERROR` | ⚠️ Flash convert: `exchange_type` parameter value must be uppercase exchange code (e.g., `GATE`) |363| `TRADE_MARGIN_INVALID_PZ_SIDE_ERROR` | Prompt that margin/futures trading must specify `position_side` (LONG/SHORT) |364| `BALANCE_NOT_ENOUGH` | Insufficient available margin, suggest reducing trade amount or depositing |365| `SYMBOL_NOT_FOUND` | Confirm trading pair format is correct (e.g., GATE_SPOT_BTC_USDT) |366| `INVALID_PARAM_VALUE` | Check parameter format (qty is numeric string, position_side is LONG/SHORT) |367| `POSITION_NOT_EMPTY` | Prompt to close position before reversing direction |368| `TRADE_ORDER_LOT_SIZE_ERROR` | Suggest adjusting quantity to minimum unit of the trading pair |369| `RATE_LIMIT_EXCEEDED` | Prompt user about rate limit; suggest retrying later or reducing request frequency |370| `TRADE_INVALID_EXCHANGE_TYPE` | Invalid exchange type; please check the `exchange_type` parameter (e.g., GATE, BINANCE, OKX, BYBIT) |