gate-exchange-crossex

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gate CrossEx Trading Suite

Gate CrossEx 交易套件

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.
本Skill是Gate CrossEx跨交易所交易的统一入口,支持多项核心操作:订单管理、仓位查询、历史记录查询。用户的意图会被路由到对应的工作流中。

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.
  • 在操作前请阅读并遵循共享运行时规则:→ references/runtime-rules.md
  • 仅可调用本Skill中明确列出的MCP工具。即使MCP服务器中存在未在此处记录的工具,也不得调用。

Module Overview

模块概述

ModuleDescriptionTrigger Keywords
SpotLimit/market buy/sell, cross-exchange arbitrage
spot buy
,
spot sell
,
buy spot
,
sell spot
MarginLong/short trading, margin management, auto-borrowing
margin long
,
margin short
,
long margin
,
short margin
FuturesUSDT perpetual contracts, dual-direction positions, leverage adjustment
futures long
,
futures short
,
open long
,
open short
TransferCross-exchange fund transfer
fund transfer
,
cross-exchange transfer
,
transfer
,
move funds
ConvertFlash convert and conversion quote workflow
convert trading
,
flash convert
,
convert
,
quote convert
OrdersQuery, cancel, amend orders, order history
query orders
,
cancel order
,
amend order
,
order history
,
list orders
PositionsQuery all position types, history records
query positions
,
check positions
,
position history
,
positions
HistoryQuery order/position/trade/interest history
history query
,
trade history
,
interest history
,
history
模块描述触发关键词
Spot(现货)限价/市价买卖、跨交易所套利
spot buy
,
spot sell
,
buy spot
,
sell spot
Margin(杠杆)做多/做空交易、杠杆管理、自动借币
margin long
,
margin short
,
long margin
,
short margin
Futures(合约)USDT永续合约、双向仓位、杠杆调整
futures long
,
futures short
,
open long
,
open short
Transfer(转账)跨交易所资金划转
fund transfer
,
cross-exchange transfer
,
transfer
,
move funds
Convert(兑换)闪兑及兑换报价流程
convert trading
,
flash convert
,
convert
,
quote convert
Orders(订单)查询、取消、修改订单,订单历史
query orders
,
cancel order
,
amend order
,
order history
,
list orders
Positions(仓位)查询所有仓位类型、历史记录
query positions
,
check positions
,
position history
,
positions
History(历史)查询订单/仓位/交易/利息历史
history query
,
trade history
,
interest history
,
history

Routing Rules

路由规则

IntentExample PhrasesRoute To
Spot Trading"Buy 100 USDT worth of BTC", "Sell 0.5 BTC", "Market buy ETH spot"Read
references/spot-trading.md
Margin Trading"Long 50 USDT worth of XRP on margin", "Short BTC on margin", "10x leverage long"Read
references/margin-trading.md
Futures Trading"Open 1 BTC futures long position", "Market short ETH", "Adjust leverage to 20x"Read
references/futures-trading.md
Cross-Exchange Transfer"Transfer 100 USDT from Gate to Binance", "Move ETH from OKX to Gate"Read
references/transfer.md
Convert Trading"Flash convert 10 USDT to BTC", "Convert 50 USDT to ETH on Gate"Read
references/convert-trading.md
Order Management"Query all open orders", "Cancel that buy order", "Amend order price", "Query order history"Read
references/order-management.md
Position Query"Query all my positions", "Show futures positions", "Position history"Read
references/position-query.md
History Query"Query trade history", "Position history", "Margin interest history", "Account ledger"Read
references/history-query.md
Unclear"Show account" , "Help me" , "Please Check my account"Clarify: Query account, then guide user
意图示例短语路由至
现货交易"买入价值100 USDT的BTC"、"卖出0.5 BTC"、"市价买入ETH现货"阅读
references/spot-trading.md
杠杆交易"杠杆做多价值50 USDT的XRP"、"杠杆做空BTC"、"10倍杠杆做多"阅读
references/margin-trading.md
合约交易"开1 BTC合约多仓"、"市价做空ETH"、"调整杠杆至20倍"阅读
references/futures-trading.md
跨交易所转账"从Gate转账100 USDT到Binance"、"将ETH从OKX转到Gate"阅读
references/transfer.md
兑换交易"闪兑10 USDT为BTC"、"在Gate将50 USDT兑换为ETH"阅读
references/convert-trading.md
订单管理"查询所有未成交订单"、"取消该买入订单"、"修改订单价格"、"查询订单历史"阅读
references/order-management.md
仓位查询"查询我的所有仓位"、"显示合约仓位"、"仓位历史"阅读
references/position-query.md
历史查询"查询交易历史"、"仓位历史"、"杠杆利息历史"、"账户流水"阅读
references/history-query.md
意图不明确"显示账户信息"、"帮帮我"、"请检查我的账户"澄清:先查询账户信息,再引导用户明确需求

MCP Tools

MCP工具

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
references/*.md
. Tools or operations not mentioned here must not be called.
本Skill仅使用带有cex_crx前缀的CrossEx MCP工具集作为核心工具家族。
范围规则:仅执行本Skill中明确记录的操作。仅可调用下表或
references/*.md
中列出的工具。不得调用未提及的工具或执行未记录的操作。

Tool 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
  • List类操作:cex_crx家族中用于查询交易对、订单、仓位、转账或历史记录的工具
  • Get类操作:cex_crx家族中用于查询单个账户设置、手续费、利率或订单详情的工具
  • Create类操作:cex_crx家族中用于创建订单、转账、兑换报价或兑换订单的工具
  • Update类操作:cex_crx家族中用于更新账户设置、杠杆或已有订单的工具
  • Cancel类操作:cex_crx家族中用于取消已有订单的工具
  • Close类操作:cex_crx家族中用于平仓的工具

Symbol And Rule Tools

交易对与规则工具

ToolPurpose
cex_crx_list_crx_rule_symbols
List supported CrossEx trading symbols
cex_crx_list_crx_rule_risk_limits
Query symbol risk limit rules
cex_crx_list_crx_transfer_coins
List assets supported for CrossEx transfer
cex_crx_get_crx_fee
Query CrossEx trading fee information
cex_crx_get_crx_interest_rate
Query CrossEx interest rates
cex_crx_list_crx_coin_discount_rate
Query collateral discount rates
工具用途
cex_crx_list_crx_rule_symbols
列出支持的CrossEx交易对
cex_crx_list_crx_rule_risk_limits
查询交易对风险限制规则
cex_crx_list_crx_transfer_coins
列出支持CrossEx转账的资产
cex_crx_get_crx_fee
查询CrossEx交易手续费信息
cex_crx_get_crx_interest_rate
查询CrossEx利率
cex_crx_list_crx_coin_discount_rate
查询抵押品折扣率

Account Tools

账户工具

ToolPurpose
cex_crx_get_crx_account
Query CrossEx account overview and balances
cex_crx_update_crx_account
Update CrossEx account settings
cex_crx_list_crx_account_book
Query CrossEx account ledger entries
工具目的
cex_crx_get_crx_account
查询CrossEx账户概览及余额
cex_crx_update_crx_account
更新CrossEx账户设置
cex_crx_list_crx_account_book
查询CrossEx账户流水条目

Transfer And Convert Tools

转账与兑换工具

ToolPurpose
cex_crx_list_crx_transfers
Query transfer history
cex_crx_create_crx_transfer
Create a cross-exchange transfer
cex_crx_create_crx_convert_quote
Get a flash convert quote
cex_crx_create_crx_convert_order
Execute a flash convert order
工具用途
cex_crx_list_crx_transfers
查询转账历史
cex_crx_create_crx_transfer
创建跨交易所转账
cex_crx_create_crx_convert_quote
获取闪兑报价
cex_crx_create_crx_convert_order
执行闪兑订单

Order Tools

订单工具

ToolPurpose
cex_crx_list_crx_open_orders
Query current open orders
cex_crx_create_crx_order
Create a CrossEx order
cex_crx_get_crx_order
Query order details
cex_crx_update_crx_order
Amend an existing order
cex_crx_cancel_crx_order
Cancel a single order
cex_crx_list_crx_history_orders
Query order history
cex_crx_list_crx_history_trades
Query trade history
工具用途
cex_crx_list_crx_open_orders
查询当前未成交订单
cex_crx_create_crx_order
创建CrossEx订单
cex_crx_get_crx_order
查询订单详情
cex_crx_update_crx_order
修改已有订单
cex_crx_cancel_crx_order
取消单个订单
cex_crx_list_crx_history_orders
查询订单历史
cex_crx_list_crx_history_trades
查询交易历史

Position And Leverage Tools

仓位与杠杆工具

ToolPurpose
cex_crx_list_crx_positions
Query current futures positions
cex_crx_list_crx_margin_positions
Query current margin positions
cex_crx_close_crx_position
Close an existing CrossEx position
cex_crx_get_crx_positions_leverage
Query futures leverage settings
cex_crx_update_crx_positions_leverage
Update futures leverage
cex_crx_get_crx_margin_positions_leverage
Query margin leverage settings
cex_crx_update_crx_margin_positions_leverage
Update margin leverage
cex_crx_list_crx_history_positions
Query futures position history
cex_crx_list_crx_history_margin_positions
Query margin position history
cex_crx_list_crx_history_margin_interests
Query margin interest history
cex_crx_list_crx_adl_rank
Query ADL rank information
工具用途
cex_crx_list_crx_positions
查询当前合约仓位
cex_crx_list_crx_margin_positions
查询当前杠杆仓位
cex_crx_close_crx_position
平仓CrossEx仓位
cex_crx_get_crx_positions_leverage
查询合约杠杆设置
cex_crx_update_crx_positions_leverage
更新合约杠杆
cex_crx_get_crx_margin_positions_leverage
查询杠杆设置
cex_crx_update_crx_margin_positions_leverage
更新杠杆
cex_crx_list_crx_history_positions
查询合约仓位历史
cex_crx_list_crx_history_margin_positions
查询杠杆仓位历史
cex_crx_list_crx_history_margin_interests
查询杠杆利息历史
cex_crx_list_crx_adl_rank
查询ADL排名信息

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.
  • 将cex_crx MCP家族作为本Skill的默认且唯一核心MCP工具家族。
  • 使用list/get工具查询交易对规则、手续费、余额、杠杆或支持的资产。
  • 当用户要求记录、审计追踪或状态验证时,优先使用历史记录和账户流水工具。

Execution

执行流程

1. Intent and Parameter Identification

1. 意图与参数识别

  • Determine module (orders/positions/history)
  • Extract key parameters:
    • Trading Pair:
      GATE_SPOT_BTC_USDT
      ,
      GATE_MARGIN_XRP_USDT
      ,
      GATE_FUTURE_ETH_USDT
    • Exchange:
      GATE
      ,
      BINANCE
      ,
      OKX
      ,
      BYBIT
    • Direction:
      BUY
      (buy/long),
      SELL
      (sell/short)
    • Quantity: USDT amount, coin quantity, contract size
    • Price: Limit, market
    • Leverage: Leverage multiplier (margin/futures only)
    • Position Side:
      LONG
      (long),
      SHORT
      (short, margin/futures only)
  • Missing Parameters: If required parameters are missing, ask user
  • 确定所属模块(订单/仓位/历史)
  • 提取关键参数:
    • 交易对
      GATE_SPOT_BTC_USDT
      GATE_MARGIN_XRP_USDT
      GATE_FUTURE_ETH_USDT
    • 交易所
      GATE
      BINANCE
      OKX
      BYBIT
    • 方向
      BUY
      (买入/做多)、
      SELL
      (卖出/做空)
    • 数量:USDT金额、代币数量、合约张数
    • 价格类型:限价、市价
    • 杠杆:杠杆倍数(仅杠杆/合约交易)
    • 仓位方向
      LONG
      (多仓)、
      SHORT
      (空仓,仅杠杆/合约交易)
  • 缺失参数:若必填参数缺失,询问用户补充

2. Pre-checks

2. 前置检查

  • Trading Pair: Call
    cex_crx_list_crx_rule_symbols
    to verify
  • Account Balance: Call
    cex_crx_get_crx_account
    to check if available margin is sufficient
  • Position Check:
    • Margin Trading: Check existing positions to avoid direction conflicts
    • Futures Trading: Check dual-direction position mode
  • Minimum Amount: Query
    min_quote_amount
    (typically 3 USDT)
  • Exchange Status: Verify target exchange is operating normally
  • 交易对验证:调用
    cex_crx_list_crx_rule_symbols
    验证交易对是否支持
  • 账户余额检查:调用
    cex_crx_get_crx_account
    确认可用保证金是否充足
  • 仓位检查
    • 杠杆交易:检查已有仓位,避免方向冲突
    • 合约交易:检查双向仓位模式
  • 最低金额检查:查询
    min_quote_amount
    (通常为3 USDT)
  • 交易所状态:验证目标交易所是否正常运营

3. Module Logic

3. 模块逻辑

Module A: Spot Trading

模块A:现货交易

  1. Parameter Confirmation:
    • Trading pair format:
      GATE_SPOT_{BASE}_{QUOTE}
    • Buy parameters:
      quote_qty
      (USDT amount)
    • Sell parameters:
      qty
      (coin quantity)
  2. Minimum Amount Check: Call
    cex_crx_list_crx_rule_symbols
    to query minimum amount
  3. Pre-order Confirmation: Display order summary (pair, direction, quantity, price), require user confirmation
  4. Place Order: Call
    cex_crx_create_crx_order
  5. Verification: Call
    cex_crx_get_crx_order
    to confirm order status
  1. 参数确认
    • 交易对格式:
      GATE_SPOT_{BASE}_{QUOTE}
    • 买入参数:
      quote_qty
      (USDT金额)
    • 卖出参数:
      qty
      (代币数量)
  2. 最低金额检查:调用
    cex_crx_list_crx_rule_symbols
    查询最低金额
  3. 下单前确认:显示订单摘要(交易对、方向、数量、价格),需用户确认
  4. 下单:调用
    cex_crx_create_crx_order
  5. 验证:调用
    cex_crx_get_crx_order
    确认订单状态

Module B: Margin Trading

模块B:杠杆交易

  1. Parameter Confirmation:
    • Trading pair format:
      GATE_MARGIN_{BASE}_{QUOTE}
    • Required parameters:
      qty
      (coin quantity),
      position_side
      (
      LONG
      or
      SHORT
      )
    • Optional parameters:
      quote_qty
      (USDT amount)
  2. Leverage Check: Query current leverage, adjust if user specifies
  3. Position Direction:
    • Long (
      LONG
      ): Buy coin, borrow USDT
    • Short (
      SHORT
      ): Sell coin, borrow coin
  4. Minimum Amount Check: Call
    cex_crx_list_crx_rule_symbols
    to query minimum amount
  5. Pre-order Confirmation: Display order summary (pair, direction, quantity, leverage), require confirmation
  6. Place Order: Call
    cex_crx_create_crx_order
    with parameter
    position_side
  7. Verification: Call
    cex_crx_list_crx_margin_positions
    with a
    symbol
    filter to confirm position
  1. 参数确认
    • 交易对格式:
      GATE_MARGIN_{BASE}_{QUOTE}
    • 必填参数:
      qty
      (代币数量)、
      position_side
      LONG
      SHORT
    • 可选参数:
      quote_qty
      (USDT金额)
  2. 杠杆检查:查询当前杠杆,若用户指定则调整
  3. 仓位方向
    • 多仓(
      LONG
      ):买入代币,借入USDT
    • 空仓(
      SHORT
      ):卖空代币,借入代币
  4. 最低金额检查:调用
    cex_crx_list_crx_rule_symbols
    查询最低金额
  5. 下单前确认:显示订单摘要(交易对、方向、数量、杠杆),需用户确认
  6. 下单:调用
    cex_crx_create_crx_order
    并传入
    position_side
    参数
  7. 验证:调用
    cex_crx_list_crx_margin_positions
    并添加
    symbol
    过滤器确认仓位

Module C: Futures Trading

模块C:合约交易

  1. Parameter Confirmation:
    • Trading pair format:
      GATE_FUTURE_{BASE}_{QUOTE}
    • Required parameters:
      qty
      (contract size),
      position_side
      (
      LONG
      or
      SHORT
      )
  2. Leverage Adjustment: If user specifies leverage, call
    cex_crx_get_crx_positions_leverage
    and
    cex_crx_update_crx_positions_leverage
  3. Contract Size Calculation (if ordering by value):
    • Get
      quanto_multiplier
      and current price
    • Round down to ensure overspending is avoided
  4. Minimum Size Check: Call
    cex_crx_list_crx_rule_symbols
    to query minimum size
  5. Pre-order Confirmation: Display order summary (pair, direction, size, leverage), require confirmation
  6. Place Order: Call
    cex_crx_create_crx_order
    with parameter
    position_side
  7. Verification: Call
    cex_crx_list_crx_positions
    with a
    symbol
    filter to confirm position
  1. 参数确认
    • 交易对格式:
      GATE_FUTURE_{BASE}_{QUOTE}
    • 必填参数:
      qty
      (合约张数)、
      position_side
      LONG
      SHORT
  2. 杠杆调整:若用户指定杠杆,调用
    cex_crx_get_crx_positions_leverage
    cex_crx_update_crx_positions_leverage
    进行调整
  3. 合约张数计算(按价值下单时):
    • 获取
      quanto_multiplier
      和当前价格
    • 向下取整避免超额支出
  4. 最低张数检查:调用
    cex_crx_list_crx_rule_symbols
    查询最低张数
  5. 下单前确认:显示订单摘要(交易对、方向、张数、杠杆),需用户确认
  6. 下单:调用
    cex_crx_create_crx_order
    并传入
    position_side
    参数
  7. 验证:调用
    cex_crx_list_crx_positions
    并添加
    symbol
    过滤器确认仓位

Module D: Cross-Exchange Transfer

模块D:跨交易所转账

  1. Transfer Type:
    • Cross-exchange transfer:
      cex_crx_create_crx_transfer
      (Exchange A -> Exchange B)
  2. Parameter Confirmation:
    • Cross-exchange transfer:
      from
      ,
      to
      ,
      coin
      ,
      amount
    • From/To Account Rules:
      CoinModeValid
      from
      /
      to
      Defaults
      USDTCross-Exchange
      SPOT
      CROSSEX
      CROSSEX_{exchange_type}
      CROSSEX
      USDTSub-Exchange
      SPOT
      CROSSEX_{exchange_type}
      or
      CROSSEX_{exchange_type}
      CROSSEX_{exchange_type}
      CROSSEX
      CROSSEX_GATE
      Non-USDTAnyMust use
      CROSSEX_{exchange_type}
      (never
      CROSSEX
      alone). Cross-exchange transfers allowed (e.g.,
      CROSSEX_BINANCE
      CROSSEX_GATE
      ).
  3. Supported Coin Check: Call
    cex_crx_list_crx_transfer_coins
    to verify
  4. Balance Check: Confirm source account has sufficient balance
  5. Pre-transfer Confirmation: Display transfer summary (source, destination, coin, quantity), require confirmation
  6. Execute Transfer: Call
    cex_crx_create_crx_transfer
  7. Verification: Call
    cex_crx_list_crx_transfers
    to query transfer history and confirm
  1. 转账类型
    • 跨交易所转账:
      cex_crx_create_crx_transfer
      (交易所A → 交易所B)
  2. 参数确认
    • 跨交易所转账:
      from
      to
      coin
      amount
    • 转出/转入账户规则
      代币模式有效
      from
      /
      to
      账户
      默认规则
      USDT跨交易所
      SPOT
      CROSSEX
      CROSSEX_{exchange_type}
      CROSSEX
      USDT交易所内
      SPOT
      CROSSEX_{exchange_type}
      CROSSEX_{exchange_type}
      CROSSEX_{exchange_type}
      CROSSEX
      CROSSEX_GATE
      非USDT任意必须使用
      CROSSEX_{exchange_type}
      (不可单独使用
      CROSSEX
      )。支持跨交易所转账(如
      CROSSEX_BINANCE
      CROSSEX_GATE
      )。
  3. 支持代币检查:调用
    cex_crx_list_crx_transfer_coins
    验证
  4. 余额检查:确认转出账户余额充足
  5. 转账前确认:显示转账摘要(转出方、转入方、代币、数量),需用户确认
  6. 执行转账:调用
    cex_crx_create_crx_transfer
  7. 验证:调用
    cex_crx_list_crx_transfers
    查询转账历史并确认

Module E: Convert Trading

模块E:兑换交易

  1. Convert Type:
    • Flash convert quote:
      cex_crx_create_crx_convert_quote
    • Flash convert execution:
      cex_crx_create_crx_convert_order
  2. Parameter Confirmation:
    • Flash convert:
      from_coin
      ,
      to_coin
      ,
      from_amount
      ,
      exchange_type
  3. Balance Check: Confirm source account has sufficient balance for the convert pair
  4. Pre-convert Confirmation: Display source asset, target asset, rate, and expected receive amount, then require confirmation
  5. Quote: Call
    cex_crx_create_crx_convert_quote
  6. Execute Convert: Call
    cex_crx_create_crx_convert_order
    with the returned
    quote_id
  7. Verification: Call
    cex_crx_get_crx_account
    to confirm resulting balances
  1. 兑换类型
    • 闪兑报价:
      cex_crx_create_crx_convert_quote
    • 闪兑执行:
      cex_crx_create_crx_convert_order
  2. 参数确认
    • 闪兑:
      from_coin
      to_coin
      from_amount
      exchange_type
  3. 余额检查:确认转出账户对应兑换对的余额充足
  4. 兑换前确认:显示转出资产、目标资产、汇率及预计到账金额,需用户确认
  5. 获取报价:调用
    cex_crx_create_crx_convert_quote
  6. 执行兑换:使用返回的
    quote_id
    调用
    cex_crx_create_crx_convert_order
  7. 验证:调用
    cex_crx_get_crx_account
    确认余额变化

Module F: Order Management

模块F:订单管理

  1. Query Orders:
    • Current open orders: Call
      cex_crx_list_crx_open_orders
    • Order details: Call
      cex_crx_get_crx_order
    • Order History: Call
      cex_crx_list_crx_history_orders
      (parameters: limit, page, from, to)
  2. Cancel Orders:
    • Single cancel: Call
      cex_crx_cancel_crx_order
  3. Amend Orders:
    • Check order status must be
      open
    • Call
      cex_crx_update_crx_order
      to amend price or quantity
  4. Display Results: Display order information in table format
  1. 查询订单
    • 当前未成交订单:调用
      cex_crx_list_crx_open_orders
    • 订单详情:调用
      cex_crx_get_crx_order
    • 订单历史:调用
      cex_crx_list_crx_history_orders
      (参数:limit、page、from、to)
  2. 取消订单
    • 单个取消:调用
      cex_crx_cancel_crx_order
  3. 修改订单
    • 检查订单状态必须为
      open
    • 调用
      cex_crx_update_crx_order
      修改价格或数量
  4. 结果展示:以表格格式展示订单信息

Module G: Position Query

模块G:仓位查询

  1. 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
  2. History Query:
    • Position History: Call
      cex_crx_list_crx_history_positions
      (parameters: limit, page, from, to)
    • Margin Position History: Call
      cex_crx_list_crx_history_margin_positions
    • Trade History: Call
      cex_crx_list_crx_history_trades
      (parameters: limit, page, from, to)
  3. Display Format:
    • Current positions: Table format (pair, direction, quantity, entry price, unrealized PnL)
    • History records: Reverse chronological order, display recent N records
  1. 查询类型
    • 合约仓位:调用
      cex_crx_list_crx_positions
    • 杠杆仓位:调用
      cex_crx_list_crx_margin_positions
    • 合约杠杆:调用
      cex_crx_get_crx_positions_leverage
    • 杠杆:调用
      cex_crx_get_crx_margin_positions_leverage
  2. 历史查询
    • 仓位历史:调用
      cex_crx_list_crx_history_positions
      (参数:limit、page、from、to)
    • 杠杆仓位历史:调用
      cex_crx_list_crx_history_margin_positions
    • 交易历史:调用
      cex_crx_list_crx_history_trades
      (参数:limit、page、from、to)
  3. 展示格式
    • 当前仓位:表格格式(交易对、方向、数量、入场价、未实现盈亏)
    • 历史记录:按时间倒序,显示最近N条记录

Module H: History Query

模块H:历史查询

  1. Order History:
    • Call
      cex_crx_list_crx_history_orders
    • Parameters:
      limit
      (max 100),
      page
      ,
      from
      (start timestamp),
      to
      (end timestamp)
  2. Trade History:
    • Call
      cex_crx_list_crx_history_trades
    • Same parameters as above
  3. Position History:
    • Call
      cex_crx_list_crx_history_positions
    • Same parameters as above
  4. Margin Position History:
    • Call
      cex_crx_list_crx_history_margin_positions
    • Same parameters as above
  5. Margin Interest History:
    • Call
      cex_crx_list_crx_history_margin_interests
    • Same parameters as above
  1. 订单历史
    • 调用
      cex_crx_list_crx_history_orders
    • 参数:
      limit
      (最大100)、
      page
      from
      (开始时间戳)、
      to
      (结束时间戳)
  2. 交易历史
    • 调用
      cex_crx_list_crx_history_trades
    • 参数与上述一致
  3. 仓位历史
    • 调用
      cex_crx_list_crx_history_positions
    • 参数与上述一致
  4. 杠杆仓位历史
    • 调用
      cex_crx_list_crx_history_margin_positions
    • 参数与上述一致
  5. 杠杆利息历史
    • 调用
      cex_crx_list_crx_history_margin_interests
    • 参数与上述一致

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."
  • 凭证:绝不提示或诱导用户在聊天中粘贴API密钥;优先使用安全的本地MCP配置。
  • 用户间转账:本Skill不支持P2P或用户间转账;仅允许用户自身账户间的转账(如SPOT ↔ CROSSEX)。
  • 交易订单:显示完整订单摘要(交易对、方向、数量、价格、杠杆),下单前需用户确认
  • 跨交易所转账:显示转账详情(转出方、转入方、数量、到账时间),需用户确认
  • 范围规则:仅调用本Skill中记录的工具。若用户请求未记录的操作,需回复该操作不受本Skill支持。
  • 批量操作:显示操作范围及影响,需用户明确确认
示例:「回复「确认」以执行上述操作。」

Error Handling

错误处理

Error CodeHandling
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.
TRADE_INVALID_QUOTE_ORDER_QTY
⚠️ Incorrect parameter name: Market buy must use
quote_qty
TRADE_INVALID_ORDER_QTY
⚠️ Limit order error: Limit orders must use
qty
(coin quantity) +
price
TRADE_ORDER_AMOUNT_MIN_ERROR
Order amount below minimum notional value (typically 3 USDT), increase quantity or amount
CONVERT_TRADE_QUOTE_EXCHANGE_INVALID_ERROR
⚠️ Flash convert:
exchange_type
parameter value must be uppercase exchange code (e.g.,
GATE
)
TRADE_MARGIN_INVALID_PZ_SIDE_ERROR
Prompt that margin/futures trading must specify
position_side
(LONG/SHORT)
BALANCE_NOT_ENOUGH
Insufficient available margin, suggest reducing trade amount or depositing
SYMBOL_NOT_FOUND
Confirm trading pair format is correct (e.g., GATE_SPOT_BTC_USDT)
INVALID_PARAM_VALUE
Check parameter format (qty is numeric string, position_side is LONG/SHORT)
POSITION_NOT_EMPTY
Prompt to close position before reversing direction
TRADE_ORDER_LOT_SIZE_ERROR
Suggest adjusting quantity to minimum unit of the trading pair
RATE_LIMIT_EXCEEDED
Prompt user about rate limit; suggest retrying later or reducing request frequency
TRADE_INVALID_EXCHANGE_TYPE
Invalid exchange type; please check the
exchange_type
parameter (e.g., GATE, BINANCE, OKX, BYBIT)
错误代码处理方式
USER_NOT_EXIST
请确认是否已开通Gate CrossEx账户。可参考Gate帮助中心 → CrossEx交易 → CrossEx账户操作指南获取说明。
TRADE_INVALID_QUOTE_ORDER_QTY
⚠️ 参数名称错误:市价买入必须使用
quote_qty
参数
TRADE_INVALID_ORDER_QTY
⚠️ 限价订单错误:限价订单必须使用
qty
(代币数量)+
price
参数
TRADE_ORDER_AMOUNT_MIN_ERROR
订单金额低于最低名义价值(通常为3 USDT),请增加数量或金额
CONVERT_TRADE_QUOTE_EXCHANGE_INVALID_ERROR
⚠️ 闪兑错误:
exchange_type
参数值必须为大写交易所代码(如
GATE
TRADE_MARGIN_INVALID_PZ_SIDE_ERROR
提示用户杠杆/合约交易必须指定
position_side
(LONG/SHORT)
BALANCE_NOT_ENOUGH
可用保证金不足,建议减少交易金额或充值
SYMBOL_NOT_FOUND
请确认交易对格式是否正确(如GATE_SPOT_BTC_USDT)
INVALID_PARAM_VALUE
检查参数格式(qty为数字字符串,position_side为LONG/SHORT)
POSITION_NOT_EMPTY
提示用户在反向操作前需先平仓
TRADE_ORDER_LOT_SIZE_ERROR
建议调整数量至交易对的最小单位
RATE_LIMIT_EXCEEDED
提示用户已触发频率限制;建议稍后重试或降低请求频率
TRADE_INVALID_EXCHANGE_TYPE
交易所类型无效;请检查
exchange_type
参数(如GATE、BINANCE、OKX、BYBIT)