gate-exchange-crossex
Original:🇺🇸 English
Translated
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".
9installs
Sourcegate/gate-skills
Added on
NPX Install
npx skill4agent add gate/gate-skills gate-exchange-crossexTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Gate CrossEx Trading Suite
This skill is the unified entry point for Gate CrossEx cross-exchange trading. It supports lots of core operations:
order management, position query, and history query. User intents are routed to corresponding workflows.
General Rules
- Read and follow the shared runtime rules before proceeding: → references/runtime-rules.md
- Only call MCP tools explicitly listed in this skill. Tools not documented here must NOT be called, even if they exist in the MCP server.
Module Overview
| Module | Description | Trigger Keywords |
|---|---|---|
| Spot | Limit/market buy/sell, cross-exchange arbitrage | |
| Margin | Long/short trading, margin management, auto-borrowing | |
| Futures | USDT perpetual contracts, dual-direction positions, leverage adjustment | |
| Transfer | Cross-exchange fund transfer | |
| Convert | Flash convert and conversion quote workflow | |
| Orders | Query, cancel, amend orders, order history | |
| Positions | Query all position types, history records | |
| History | Query order/position/trade/interest history | |
Routing Rules
| Intent | Example Phrases | Route To |
|---|---|---|
| Spot Trading | "Buy 100 USDT worth of BTC", "Sell 0.5 BTC", "Market buy ETH spot" | Read |
| Margin Trading | "Long 50 USDT worth of XRP on margin", "Short BTC on margin", "10x leverage long" | Read |
| Futures Trading | "Open 1 BTC futures long position", "Market short ETH", "Adjust leverage to 20x" | Read |
| Cross-Exchange Transfer | "Transfer 100 USDT from Gate to Binance", "Move ETH from OKX to Gate" | Read |
| Convert Trading | "Flash convert 10 USDT to BTC", "Convert 50 USDT to ETH on Gate" | Read |
| Order Management | "Query all open orders", "Cancel that buy order", "Amend order price", "Query order history" | Read |
| Position Query | "Query all my positions", "Show futures positions", "Position history" | Read |
| History Query | "Query trade history", "Position history", "Margin interest history", "Account ledger" | Read |
| Unclear | "Show account" , "Help me" , "Please Check my account" | Clarify: Query account, then guide user |
MCP Tools
This skill uses the CrossEx MCP toolset with the cex_crx prefix as its only core tool family.
Scope rule: Only execute operations explicitly documented in this skill. Only call tools listed in the tables below
or in . Tools or operations not mentioned here must not be called.
references/*.mdTool Naming Convention
- List operations in the cex_crx family query symbols, orders, positions, transfers, or history
- Get operations in the cex_crx family query a single account setting, fee, rate, or order detail
- Create operations in the cex_crx family create an order, transfer, convert quote, or convert order
- Update operations in the cex_crx family update account settings, leverage, or existing orders
- Cancel operations in the cex_crx family cancel an existing order
- Close operations in the cex_crx family close an existing position
Symbol And Rule Tools
| Tool | Purpose |
|---|---|
| List supported CrossEx trading symbols |
| Query symbol risk limit rules |
| List assets supported for CrossEx transfer |
| Query CrossEx trading fee information |
| Query CrossEx interest rates |
| Query collateral discount rates |
Account Tools
| Tool | Purpose |
|---|---|
| Query CrossEx account overview and balances |
| Update CrossEx account settings |
| Query CrossEx account ledger entries |
Transfer And Convert Tools
| Tool | Purpose |
|---|---|
| Query transfer history |
| Create a cross-exchange transfer |
| Get a flash convert quote |
| Execute a flash convert order |
Order Tools
| Tool | Purpose |
|---|---|
| Query current open orders |
| Create a CrossEx order |
| Query order details |
| Amend an existing order |
| Cancel a single order |
| Query order history |
| Query trade history |
Position And Leverage Tools
| Tool | Purpose |
|---|---|
| Query current futures positions |
| Query current margin positions |
| Close an existing CrossEx position |
| Query futures leverage settings |
| Update futures leverage |
| Query margin leverage settings |
| Update margin leverage |
| Query futures position history |
| Query margin position history |
| Query margin interest history |
| Query ADL rank information |
Usage Guidance
- Use the cex_crx MCP family as the default and only core MCP family for this skill.
- Use list/get tools to query symbol rules, fees, balances, leverage, or supported assets.
- Prefer history and account-book tools when the user asks for records, audit trails, or status verification.
Execution
1. Intent and Parameter Identification
- Determine module (orders/positions/history)
- Extract key parameters:
- Trading Pair: ,
GATE_SPOT_BTC_USDT,GATE_MARGIN_XRP_USDTGATE_FUTURE_ETH_USDT - Exchange: ,
GATE,BINANCE,OKXBYBIT - Direction: (buy/long),
BUY(sell/short)SELL - Quantity: USDT amount, coin quantity, contract size
- Price: Limit, market
- Leverage: Leverage multiplier (margin/futures only)
- Position Side: (long),
LONG(short, margin/futures only)SHORT
- Trading Pair:
- Missing Parameters: If required parameters are missing, ask user
2. Pre-checks
- Trading Pair: Call to verify
cex_crx_list_crx_rule_symbols - Account Balance: Call to check if available margin is sufficient
cex_crx_get_crx_account - Position Check:
- Margin Trading: Check existing positions to avoid direction conflicts
- Futures Trading: Check dual-direction position mode
- Minimum Amount: Query (typically 3 USDT)
min_quote_amount - Exchange Status: Verify target exchange is operating normally
3. Module Logic
Module A: Spot Trading
- Parameter Confirmation:
- Trading pair format:
GATE_SPOT_{BASE}_{QUOTE} - Buy parameters: (USDT amount)
quote_qty - Sell parameters: (coin quantity)
qty
- Trading pair format:
- Minimum Amount Check: Call to query minimum amount
cex_crx_list_crx_rule_symbols - Pre-order Confirmation: Display order summary (pair, direction, quantity, price), require user confirmation
- Place Order: Call
cex_crx_create_crx_order - Verification: Call to confirm order status
cex_crx_get_crx_order
Module B: Margin Trading
- Parameter Confirmation:
- Trading pair format:
GATE_MARGIN_{BASE}_{QUOTE} - Required parameters: (coin quantity),
qty(position_sideorLONG)SHORT - Optional parameters: (USDT amount)
quote_qty
- Trading pair format:
- Leverage Check: Query current leverage, adjust if user specifies
- Position Direction:
- Long (): Buy coin, borrow USDT
LONG - Short (): Sell coin, borrow coin
SHORT
- Long (
- Minimum Amount Check: Call to query minimum amount
cex_crx_list_crx_rule_symbols - Pre-order Confirmation: Display order summary (pair, direction, quantity, leverage), require confirmation
- Place Order: Call with parameter
cex_crx_create_crx_orderposition_side - Verification: Call with a
cex_crx_list_crx_margin_positionsfilter to confirm positionsymbol
Module C: Futures Trading
- Parameter Confirmation:
- Trading pair format:
GATE_FUTURE_{BASE}_{QUOTE} - Required parameters: (contract size),
qty(position_sideorLONG)SHORT
- Trading pair format:
- Leverage Adjustment: If user specifies leverage, call and
cex_crx_get_crx_positions_leveragecex_crx_update_crx_positions_leverage - Contract Size Calculation (if ordering by value):
- Get and current price
quanto_multiplier - Round down to ensure overspending is avoided
- Get
- Minimum Size Check: Call to query minimum size
cex_crx_list_crx_rule_symbols - Pre-order Confirmation: Display order summary (pair, direction, size, leverage), require confirmation
- Place Order: Call with parameter
cex_crx_create_crx_orderposition_side - Verification: Call with a
cex_crx_list_crx_positionsfilter to confirm positionsymbol
Module D: Cross-Exchange Transfer
- Transfer Type:
- Cross-exchange transfer: (Exchange A -> Exchange B)
cex_crx_create_crx_transfer
- Cross-exchange transfer:
- Parameter Confirmation:
- Cross-exchange transfer: ,
from,to,coinamount - From/To Account Rules:
Coin Mode Valid /fromtoDefaults USDT Cross-Exchange ↔SPOTCROSSEX→CROSSEX_{exchange_type}CROSSEXUSDT Sub-Exchange ↔SPOTorCROSSEX_{exchange_type}↔CROSSEX_{exchange_type}CROSSEX_{exchange_type}→CROSSEXCROSSEX_GATENon-USDT Any Must use (neverCROSSEX_{exchange_type}alone). Cross-exchange transfers allowed (e.g.,CROSSEX↔CROSSEX_BINANCE).CROSSEX_GATE—
- Cross-exchange transfer:
- Supported Coin Check: Call to verify
cex_crx_list_crx_transfer_coins - Balance Check: Confirm source account has sufficient balance
- Pre-transfer Confirmation: Display transfer summary (source, destination, coin, quantity), require confirmation
- Execute Transfer: Call
cex_crx_create_crx_transfer - Verification: Call to query transfer history and confirm
cex_crx_list_crx_transfers
Module E: Convert Trading
- Convert Type:
- Flash convert quote:
cex_crx_create_crx_convert_quote - Flash convert execution:
cex_crx_create_crx_convert_order
- Flash convert quote:
- Parameter Confirmation:
- Flash convert: ,
from_coin,to_coin,from_amountexchange_type
- Flash convert:
- Balance Check: Confirm source account has sufficient balance for the convert pair
- Pre-convert Confirmation: Display source asset, target asset, rate, and expected receive amount, then require confirmation
- Quote: Call
cex_crx_create_crx_convert_quote - Execute Convert: Call with the returned
cex_crx_create_crx_convert_orderquote_id - Verification: Call to confirm resulting balances
cex_crx_get_crx_account
Module F: Order Management
- Query Orders:
- Current open orders: Call
cex_crx_list_crx_open_orders - Order details: Call
cex_crx_get_crx_order - Order History: Call (parameters: limit, page, from, to)
cex_crx_list_crx_history_orders
- Current open orders: Call
- Cancel Orders:
- Single cancel: Call
cex_crx_cancel_crx_order
- Single cancel: Call
- Amend Orders:
- Check order status must be
open - Call to amend price or quantity
cex_crx_update_crx_order
- Check order status must be
- Display Results: Display order information in table format
Module G: Position Query
- Query Types:
- Futures positions: Call
cex_crx_list_crx_positions - Margin positions: Call
cex_crx_list_crx_margin_positions - Futures leverage: Call
cex_crx_get_crx_positions_leverage - Margin leverage: Call
cex_crx_get_crx_margin_positions_leverage
- Futures positions: Call
- History Query:
- Position History: Call (parameters: limit, page, from, to)
cex_crx_list_crx_history_positions - Margin Position History: Call
cex_crx_list_crx_history_margin_positions - Trade History: Call (parameters: limit, page, from, to)
cex_crx_list_crx_history_trades
- Position History: Call
- Display Format:
- Current positions: Table format (pair, direction, quantity, entry price, unrealized PnL)
- History records: Reverse chronological order, display recent N records
Module H: History Query
- Order History:
- Call
cex_crx_list_crx_history_orders - Parameters: (max 100),
limit,page(start timestamp),from(end timestamp)to
- Call
- Trade History:
- Call
cex_crx_list_crx_history_trades - Same parameters as above
- Call
- Position History:
- Call
cex_crx_list_crx_history_positions - Same parameters as above
- Call
- Margin Position History:
- Call
cex_crx_list_crx_history_margin_positions - Same parameters as above
- Call
- Margin Interest History:
- Call
cex_crx_list_crx_history_margin_interests - Same parameters as above
- Call
Report Template
After each operation, output a concise standardized result.
Safety Rules
- Credentials: Never prompt or induce the user to paste API Secret Key into chat; prefer secure local MCP configuration.
- 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.
- Trade Orders: Display complete order summary (pair, direction, quantity, price, leverage), require user confirmation before placing order
- Cross-Exchange Transfer: Display transfer details (source, destination, quantity, arrival time), require confirmation
- Scope rule: Only call tools documented in this skill. If the user requests an operation not documented here, respond that it is not supported by this skill.
- Batch Operations: Display operation scope and impact, require explicit confirmation
Example: "Reply 'confirm' to execute the above operation."
Error Handling
| Error Code | Handling |
|---|---|
| Please confirm if a GATE CrossEx account has been opened. Refer to the GATE Help Center -> CrossEx Trading -> CrossEx Account Operation Guide for instructions. |
| ⚠️ Incorrect parameter name: Market buy must use |
| ⚠️ Limit order error: Limit orders must use |
| Order amount below minimum notional value (typically 3 USDT), increase quantity or amount |
| ⚠️ Flash convert: |
| Prompt that margin/futures trading must specify |
| Insufficient available margin, suggest reducing trade amount or depositing |
| Confirm trading pair format is correct (e.g., GATE_SPOT_BTC_USDT) |
| Check parameter format (qty is numeric string, position_side is LONG/SHORT) |
| Prompt to close position before reversing direction |
| Suggest adjusting quantity to minimum unit of the trading pair |
| Prompt user about rate limit; suggest retrying later or reducing request frequency |
| Invalid exchange type; please check the |