gate-exchange-tradfi

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gate TradFi Suite

Gate TradFi 工具套件

Read and follow the shared runtime rules before proceeding: → exchange-runtime-rules.md
This skill is the single entry for Gate TradFi (traditional finance). All MCP tools used are prefixed with
cex_tradfi
. It supports query modules (orders, positions, market, assets) and trading modules (place order, amend order, cancel order, modify position, close position). Read the MCP tool definitions for exact tool names, parameters, and value constraints; declare conditions and limits in this skill and in each reference.
在开始操作前,请阅读并遵循共享的运行时规则: → exchange-runtime-rules.md
本Skill是Gate TradFi(传统金融)的唯一入口,所使用的所有MCP工具均以
cex_tradfi
为前缀。它支持查询模块(订单、持仓、市场、资产)和交易模块(下单、修改订单、取消订单、调整持仓、平仓)。请查阅MCP工具定义以了解确切的工具名称、参数和值约束;在本Skill及每个参考文档中声明条件和限制。

Sub-Modules

子模块

ModuleDescriptionTrigger keywords
Query ordersOrder list, order history
orders
,
open orders
,
order history
Query positionsCurrent position list, position history
positions
,
my positions
,
position history
,
holdings
,
current position
Query marketCategory list, symbol list, ticker, symbol kline
category
,
categories
,
symbol list
,
symbols
,
ticker
,
kline
,
candlestick
,
market
Query assetsUser balance/asset info, MT5 account info
assets
,
balance
,
account
,
my funds
,
MT5
,
mt5 account
Place orderCreate new order (supports take-profit/stop-loss at creation)
place order
,
create order
,
open order
,
buy
,
sell
,
long
,
short
,
take-profit
,
stop-loss
Amend orderChange order price, take-profit, or stop-loss (size not supported)
amend order
,
modify order
,
change price
,
take-profit
,
stop-loss
Cancel orderCancel one or more orders
cancel order
,
revoke order
,
cancel
Modify positionChange position take-profit/stop-loss only (leverage, margin not supported)
modify position
,
take-profit
,
stop-loss
,
change take-profit
,
change stop-loss
Close positionFull or partial close
close position
,
close
,
close all
,
flat
模块描述触发关键词
查询订单订单列表、订单历史
orders
,
open orders
,
order history
查询持仓当前持仓列表、持仓历史
positions
,
my positions
,
position history
,
holdings
,
current position
查询市场品类列表、交易对列表、行情报价、交易对K线
category
,
categories
,
symbol list
,
symbols
,
ticker
,
kline
,
candlestick
,
market
查询资产用户余额/资产信息、MT5账户信息
assets
,
balance
,
account
,
my funds
,
MT5
,
mt5 account
下单创建新订单(支持在创建时设置止盈/止损)
place order
,
create order
,
open order
,
buy
,
sell
,
long
,
short
,
take-profit
,
stop-loss
修改订单更改订单价格、止盈或止损(不支持修改订单规模)
amend order
,
modify order
,
change price
,
take-profit
,
stop-loss
取消订单取消一个或多个订单
cancel order
,
revoke order
,
cancel
调整持仓仅修改持仓的止盈/止损价格(不支持修改杠杆、保证金)
modify position
,
take-profit
,
stop-loss
,
change take-profit
,
change stop-loss
平仓全部或部分平仓
close position
,
close
,
close all
,
flat

Routing Rules

路由规则

IntentExample phrasesRoute to
Query orders"My TradFi orders", "order history", "show open orders", "order status"Read
references/query-orders.md
Query positions"My positions", "position history", "current holdings", "what am I holding"Read
references/query-positions.md
Query market"TradFi categories", "category list", "symbol list", "ticker", "kline for X", "market data"Read
references/query-market.md
Query assets"My assets", "balance", "account balance", "MT5 account", "my MT5 info"Read
references/query-assets.md
Place order"Place order", "buy EURUSD", "sell XAUUSD 0.1", "open long", "order with take-profit/stop-loss"Read
references/place-order.md
Amend order"Amend order", "change price to X", "take-profit", "stop-loss"Read
references/amend-order.md
Cancel order"Cancel order", "cancel all orders", "revoke order"Read
references/cancel-order.md
Modify position"Modify position", "take-profit", "stop-loss", "change take-profit/stop-loss"Read
references/modify-position.md
Close position"Close position", "close all", "close half", "flat"Read
references/close-position.md
Unclear"TradFi", "show me my TradFi"Clarify: list query and trading modules or ask which the user wants.
意图示例短语路由至
查询订单"My TradFi orders", "order history", "show open orders", "order status"阅读
references/query-orders.md
查询持仓"My positions", "position history", "current holdings", "what am I holding"阅读
references/query-positions.md
查询市场"TradFi categories", "category list", "symbol list", "ticker", "kline for X", "market data"阅读
references/query-market.md
查询资产"My assets", "balance", "account balance", "MT5 account", "my MT5 info"阅读
references/query-assets.md
下单"Place order", "buy EURUSD", "sell XAUUSD 0.1", "open long", "order with take-profit/stop-loss"阅读
references/place-order.md
修改订单"Amend order", "change price to X", "take-profit", "stop-loss"阅读
references/amend-order.md
取消订单"Cancel order", "cancel all orders", "revoke order"阅读
references/cancel-order.md
调整持仓"Modify position", "take-profit", "stop-loss", "change take-profit/stop-loss"阅读
references/modify-position.md
平仓"Close position", "close all", "close half", "flat"阅读
references/close-position.md
意图不明确"TradFi", "show me my TradFi"澄清: 列出查询和交易模块,或询问用户需求。

MCP Tools

MCP工具

Query (read-only) — use only MCP-documented parameters.
#ToolPurpose
1
cex_tradfi_query_order_list
List open orders.
2
cex_tradfi_query_order_history_list
Query order history list (filled/cancelled).
3
cex_tradfi_query_position_list
List current positions.
4
cex_tradfi_query_position_history_list
List historical positions/settlements.
5
cex_tradfi_query_categories
Query TradFi category list.
6
cex_tradfi_query_symbols
List symbols (by category if supported).
7
cex_tradfi_query_symbol_ticker
Get ticker(s) for symbol(s).
8
cex_tradfi_query_symbol_detail
Get symbol config (required before place order: leverages, min_order_volume, step_order_volume). If no result, symbol may not exist — do not place order.
9
cex_tradfi_query_symbol_kline
Get kline/candlestick for symbol.
10
cex_tradfi_query_user_assets
Get user account/balance (assets).
11
cex_tradfi_query_mt5_account_info
Get MT5 account info.
Trading (write) — exact tool names and parameters must match the Gate TradFi MCP tool definition. Conditions and value limits (required/optional, ranges, allowed symbols) must be declared in the skill and in each reference; do not pass undocumented parameters.
#Tool (name per MCP)Purpose
12
cex_tradfi_create_tradfi_order
Place new order; supports take-profit/stop-loss. Before calling: use
cex_tradfi_query_symbol_detail
to validate symbol and get min_order_volume, step_order_volume, leverages.
13
cex_tradfi_update_order
Amend order price, take-profit, stop-loss only (size not supported).
14
cex_tradfi_delete_order
Cancel/delete one order. Does not support batch; one order per call.
15
cex_tradfi_update_position
Modify position take-profit/stop-loss price only (leverage, margin not supported).
16
cex_tradfi_close_position
(or MCP equivalent)
Close position (full or partial). Full close: position identifier only, do not pass size/close_volume.
查询(只读) — 仅使用MCP文档中规定的参数。
序号工具用途
1
cex_tradfi_query_order_list
查询未平仓订单列表。
2
cex_tradfi_query_order_history_list
查询订单历史列表(已成交/已取消)。
3
cex_tradfi_query_position_list
查询当前持仓列表。
4
cex_tradfi_query_position_history_list
查询历史持仓/结算记录列表。
5
cex_tradfi_query_categories
查询TradFi品类列表。
6
cex_tradfi_query_symbols
查询交易对列表(支持按品类筛选)。
7
cex_tradfi_query_symbol_ticker
获取交易对的行情报价。
8
cex_tradfi_query_symbol_detail
获取交易对配置信息(下单前必填:杠杆、最小下单量、下单量步长)。若无结果,表明该交易对不存在——请勿下单。
9
cex_tradfi_query_symbol_kline
获取交易对的K线/蜡烛图数据。
10
cex_tradfi_query_user_assets
获取用户账户/余额(资产)信息。
11
cex_tradfi_query_mt5_account_info
获取MT5账户信息。
交易(写入) — 必须严格匹配Gate TradFi MCP工具定义中的工具名称和参数。必须在Skill及每个参考文档中声明条件和值限制(必填/可选参数、范围、允许的交易对);请勿传递未文档化的参数。
序号工具(MCP规定名称)用途
12
cex_tradfi_create_tradfi_order
创建新订单;支持设置止盈/止损。调用前:使用
cex_tradfi_query_symbol_detail
验证交易对,并获取最小下单量、下单量步长、杠杆信息。
13
cex_tradfi_update_order
仅修改订单价格、止盈、止损(不支持修改订单规模)。
14
cex_tradfi_delete_order
取消/删除单个订单。不支持批量操作;每次调用仅处理一个订单。
15
cex_tradfi_update_position
仅修改持仓的止盈/止损价格(不支持修改杠杆、保证金)。
16
cex_tradfi_close_position
(或MCP等效工具)
平仓(全部或部分)。全部平仓:仅传递持仓标识符,无需传递规模/平仓量。

Parameter conditions and limits

参数条件与限制

  • For each MCP tool, input conditions and limits (required/optional parameters, value ranges, allowed symbols, precision) are defined in the MCP. This skill and each reference document must declare those conditions and limits so the agent and user know what can be sent.
  • In each trading reference (
    place-order.md
    ,
    amend-order.md
    ,
    cancel-order.md
    ,
    modify-position.md
    ,
    close-position.md
    ), include a Parameters section that states: required/optional params, value constraints, and any MCP-specific rules. Do not add parameters that the MCP does not document.
  • If the user provides a value outside allowed range or a missing required param, ask for correction before building the confirmation payload.
  • 每个MCP工具的输入条件与限制(必填/可选参数、值范围、允许的交易对、精度)均在MCP中定义。本Skill及每个参考文档必须声明这些条件与限制,以便Agent和用户了解可传递的参数。
  • 在每个交易参考文档(
    place-order.md
    amend-order.md
    cancel-order.md
    modify-position.md
    close-position.md
    )中,需包含参数部分,说明:必填/可选参数、值约束,以及任何MCP特定规则。请勿添加MCP未文档化的参数。
  • 如果用户提供的值超出允许范围或缺少必填参数,请在构建确认请求前要求用户更正。

User confirmation (trading only)

用户确认(仅交易操作)

  • Before calling any trading MCP tool (place order, amend order, cancel order, modify position, close position): output all parameters that will be sent to the MCP so the user can review them. Ask the user to confirm (e.g. "Confirm: place order with symbol=X, side=Y, size=Z, price=W. Reply yes to execute."). Do not call the tool until the user explicitly confirms.
  • This applies to every write operation; query-only flows do not require confirmation.
  • 调用任何交易类MCP工具(下单、修改订单、取消订单、调整持仓、平仓)之前输出所有将发送至MCP的参数供用户审核。请用户确认(例如:“确认:下单交易对=X,方向=Y,规模=Z,价格=W。回复yes以执行。”)。在用户明确确认前,请勿调用工具。
  • 此规则适用于所有写入操作;仅查询流程无需确认。

Response parameter explanation (trading only)

响应参数说明(仅交易操作)

  • After the trading MCP tool returns: in the response to the user, explain the parameters that were used (e.g. symbol, side, size, price, order_id, or position identifier) and the outcome (e.g. order created, order amended, order cancelled, position modified, position closed). Include a short summary table or list of the sent parameters and the result (success or error code/message). This is declared in this skill so the agent always reports back what was sent and what happened.
  • 交易类MCP工具返回结果之后:在给用户的响应中,说明所使用的参数(例如:交易对、方向、规模、价格、订单ID或持仓标识符)以及操作结果(例如:订单已创建、订单已修改、订单已取消、持仓已调整、持仓已平仓)。包含一个简短的汇总表格或列表,列出发送的参数和结果(成功或错误代码/消息)。本Skill中声明此规则,以便Agent始终向用户反馈发送的内容和操作结果。

Execution

执行流程

1. Intent and parameters

1. 意图与参数

  • Determine module: Query (orders, positions, market, assets) or Trading (place, amend, cancel, modify position, close).
  • For each MCP tool call, use only the parameters defined in the Gate TradFi MCP tool definition. Do not pass parameters that are not documented in the MCP.
  • Extract from user message only those keys that the MCP actually supports. Respect conditions and limits declared in the skill and in the reference.
  • 确定模块:查询(订单、持仓、市场、资产)或交易(下单、修改、取消、调整持仓、平仓)。
  • 每次调用MCP工具时,仅使用Gate TradFi MCP工具定义中规定的参数。请勿传递MCP未文档化的参数。
  • 仅从用户消息中提取MCP实际支持的键。遵守Skill和参考文档中声明的条件与限制。

2. Read sub-module and call tools

2. 读取子模块并调用工具

  • Load the corresponding reference under
    references/
    and follow its Workflow.
  • Query: Call query tools with extracted/prompted parameters; no confirmation needed.
  • Trading: Build the parameter set per the reference and MCP; output parameters for user confirmation; only after user confirms, call the trading MCP tool; then in the response, explain the parameters used and the outcome.
  • 加载
    references/
    下对应的参考文档并遵循其工作流程。
  • 查询:使用提取/询问得到的参数调用查询工具;无需确认。
  • 交易:根据参考文档和MCP构建参数集;输出参数供用户确认;仅在用户确认后,调用交易类MCP工具;然后在响应中说明使用的参数和操作结果

3. Report

3. 结果反馈

  • Query: Use the sub-module Report Template (tables for orders/positions/tickers, assets).
  • Trading: Use the reference Report Template; include parameter summary (what was sent) and result (success or error).
  • 查询:使用子模块的报告模板(订单/持仓/行情报价/资产表格)。
  • 交易:使用参考文档的报告模板;包含参数汇总(发送的内容)和结果(成功或错误)。

Domain Knowledge

领域知识

  • TradFi: Gate’s traditional finance product set (e.g. FX, MT5). Symbols and categories are product-specific.
  • Query: Orders, positions, market, assets — use only MCP-documented parameters.
  • Trading: Place/amend/cancel orders and modify/close positions — use only MCP-documented tools and parameters; declare conditions/limits; require user confirmation before execution; explain parameters and outcome in the response.
  • Order id for cancel/amend: The order id used by
    cex_tradfi_delete_order
    and
    cex_tradfi_update_order
    must come from
    cex_tradfi_query_order_list
    . Do not use the
    id
    or
    log_id
    returned by
    cex_tradfi_create_tradfi_order
    for cancel or amend.
  • TradFi:Gate的传统金融产品集合(例如:外汇、MT5)。交易对和品类是产品特定的。
  • 查询:订单、持仓、市场、资产——仅使用MCP文档化的参数。
  • 交易:下单/修改/取消订单、调整/平仓持仓——仅使用MCP文档化的工具和参数;声明条件/限制;执行前需用户确认;响应中需说明使用的参数和结果。
  • 取消/修改订单的订单ID
    cex_tradfi_delete_order
    cex_tradfi_update_order
    所使用的订单ID必须来自
    cex_tradfi_query_order_list
    请勿使用
    cex_tradfi_create_tradfi_order
    返回的
    id
    log_id
    进行取消或修改操作。

Error Handling

错误处理

SituationAction
Tool not found / 4xx/5xxTell user the TradFi service or tool may be unavailable; suggest retry or check Gate MCP configuration.
Empty listReport "No open orders" / "No positions" / "No symbols" etc., and do not assume error.
Invalid symbol / order not foundReport "Order not found" or "Symbol not found" and suggest checking symbol list.
Auth / permission errorDo not expose credentials; ask user to check API key or MCP auth for TradFi.
Trading error (e.g. insufficient margin, invalid price)Show the error message; in the response, restate the parameters that were sent and suggest correction.
场景操作
工具未找到 / 4xx/5xx错误告知用户TradFi服务或工具可能不可用;建议重试或检查Gate MCP配置。
空列表反馈“无未平仓订单”/“无持仓”/“无交易对”等,请勿视为错误。
无效交易对 / 未找到订单反馈“未找到订单”或“未找到交易对”,建议用户查看交易对列表。
授权 / 权限错误请勿暴露凭证;请用户检查API密钥或TradFi的MCP授权。
交易错误(例如:保证金不足、价格无效)显示错误消息;在响应中重述发送的参数并建议用户更正。

Safety Rules

安全规则

  • Query: No confirmation required; display data after tool success.
  • Trading: Always output parameters for user confirmation before calling place/amend/cancel/modify/close; never execute a write operation without explicit user confirmation. After execution, always explain in the response the parameters that were used and the outcome.
  • Sensitive data: Do not log or store credentials or balances; display only in the current response.
  • 查询:无需确认;工具调用成功后展示数据。
  • 交易调用下单/修改/取消/调整/平仓工具之前,始终输出参数供用户确认;绝不在无用户明确确认的情况下执行写入操作。执行后,始终在响应中说明使用的参数和操作结果。
  • 敏感数据:请勿记录或存储凭证或余额;仅在当前响应中展示。

Report Template

报告模板

Query — After each query:
  • Orders: Table with columns such as symbol, side, size, price, status, time (from list response).
  • Positions: Table with position fields (e.g. symbol, side, size, entry, margin) or "No open positions."
  • Market: Category list; symbol list; ticker table (symbol, last, 24h change, volume); or symbol kline summary (interval, range, OHLC).
  • Assets: List of assets and balances; or MT5 account/server/balance/equity table; or "Unable to load" on error.
Trading — After each place/amend/cancel/modify/close:
  • Parameters used: List or table of the parameters sent to the MCP (e.g. symbol, side, size, price, order_id).
  • Result: Success (e.g. order id, status) or error (code/message). Suggest next step if error.
查询 — 每次查询后:
  • 订单:表格包含交易对、方向、规模、价格、状态、时间(来自列表响应)等列。
  • 持仓:持仓字段表格(例如:交易对、方向、规模、入场价、保证金)或“无未平仓持仓”。
  • 市场:品类列表;交易对列表;行情报价表格(交易对、最新价、24h涨跌幅、成交量);或交易对K线汇总(时间间隔、范围、开盘价/最高价/最低价/收盘价)。
  • 资产:资产与余额列表;或MT5账户/服务器/余额/净值表格;或错误时显示“无法加载”。
交易 — 每次下单/修改/取消/调整/平仓后:
  • 使用的参数:发送至MCP的参数列表或表格(例如:交易对、方向、规模、价格、订单ID)。
  • 结果:成功(例如:订单ID、状态)或错误(代码/消息)。若出错,建议下一步操作。