gate-exchange-assets-manager

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Resolving
gate-cli
(binary path)

解析
gate-cli
(二进制路径)

Resolve
gate-cli
in order: (1)
command -v gate-cli
and
gate-cli --version
succeeds; (2)
${HOME}/.local/bin/gate-cli
if executable; (3)
${HOME}/.openclaw/skills/bin/gate-cli
if executable. Canonical rules:
exchange-runtime-rules.md
§4 (or
gate-runtime-rules.md
§4).
按以下顺序解析**
gate-cli
**:(1) **
command -v gate-cli
gate-cli --version
**执行成功;(2) 若
${HOME}/.local/bin/gate-cli
可执行则使用该路径;(3) 若
${HOME}/.openclaw/skills/bin/gate-cli
可执行则使用该路径。规范规则参考:
exchange-runtime-rules.md
第4节(或
gate-runtime-rules.md
第4节)。

Gate Account and Asset Manager

Gate账户与资产管理工具

This is an L2 composite skill that orchestrates 58 deduplicated MCP tool calls (54 read + 4 write) across 7 L1 skills. It provides a unified entry point for account and asset overview, margin and liquidation risk assessment, SimpleEarn and staking earnings snapshots, affiliate commission queries, and unified-account write operations (borrowing, collateral, leverage settings). This skill is intended for users aged 18 or above with full civil capacity.
这是一个L2复合技能,可协调7个L1技能中的58个去重MCP工具调用(54个读操作 + 4个写操作)。它为账户与资产概览、保证金与清算风险评估、SimpleEarn和质押收益快照、联盟佣金查询以及统一账户写操作(借款、抵押、杠杆设置)提供统一入口。 本技能面向年满18周岁且具备完全民事行为能力的用户。

General Rules

通用规则

⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. Do NOT select or call any tool until all rules are read. These rules have the highest priority. → Read gate-runtime-rules.md
  • Only use the
    gate-cli
    commands explicitly listed in this skill.
    Commands not documented here must NOT be run for these workflows, even if other interfaces expose them.
⚠️ 停止操作 — 在继续之前,您必须阅读并严格遵守共享运行时规则。 在未读完所有规则前,请勿选择或调用任何工具。这些规则具有最高优先级。 → 阅读 gate-runtime-rules.md
  • 仅使用本技能中明确列出的
    gate-cli
    命令
    。即使其他接口提供了未在此处记录的命令,也不得在这些工作流中运行。

Skill Dependencies

技能依赖

gate-cli commands used

使用的gate-cli命令

Query Operations (Read-only)
  • gate-cli cex alpha account balances
  • gate-cli cex alpha market currencies
  • gate-cli cex alpha market tickers
  • gate-cli cex alpha market tokens
  • gate-cli cex earn staking assets
  • gate-cli cex earn staking awards
  • gate-cli cex earn staking find
  • gate-cli cex earn uni currency
  • gate-cli cex earn uni interest
  • gate-cli cex earn dual balance
  • gate-cli cex earn dual orders
  • cex_earn_list_structured_orders
  • gate-cli cex earn uni currencies
  • gate-cli cex earn uni rate
  • gate-cli cex earn uni lends
  • gate-cli cex earn staking orders
  • gate-cli cex futures account get
  • gate-cli cex futures market candlesticks
  • gate-cli cex futures market contract
  • gate-cli cex futures market funding-rate
  • gate-cli cex futures market orderbook
  • gate-cli cex futures market premium
  • gate-cli cex futures market tickers
  • gate-cli cex futures market trades
  • gate-cli cex futures market liquidations
  • gate-cli cex futures position list
  • gate-cli cex margin account list
  • gate-cli cex options account get
  • gate-cli cex rebate broker commissions
  • gate-cli cex rebate broker transactions
  • gate-cli cex rebate partner commissions
  • gate-cli cex rebate partner sub-list
  • gate-cli cex rebate partner transactions
  • gate-cli cex rebate user-info
  • gate-cli cex rebate sub-relation
  • gate-cli cex spot account get
  • gate-cli cex spot market candlesticks
  • gate-cli cex spot market orderbook
  • gate-cli cex spot market tickers
  • gate-cli cex spot market trades
  • gate-cli cex spot account book
  • gate-cli cex tradfi account assets
  • gate-cli cex unified account get
  • gate-cli cex unified query borrowable
  • gate-cli cex unified query estimate-rate
  • gate-cli cex unified mode get
  • gate-cli cex unified query transferable
  • gate-cli cex unified config leverage-get
  • gate-cli cex unified config discount-tiers
  • gate-cli cex unified account currencies
  • gate-cli cex unified loan interest
  • gate-cli cex unified loan records
  • gate-cli cex wallet balance total
Execution Operations (Write)
  • gate-cli cex unified loan create
  • gate-cli cex unified config collateral
  • gate-cli cex unified mode set
  • gate-cli cex unified config leverage-set
查询操作(只读)
  • gate-cli cex alpha account balances
  • gate-cli cex alpha market currencies
  • gate-cli cex alpha market tickers
  • gate-cli cex alpha market tokens
  • gate-cli cex earn staking assets
  • gate-cli cex earn staking awards
  • gate-cli cex earn staking find
  • gate-cli cex earn uni currency
  • gate-cli cex earn uni interest
  • gate-cli cex earn dual balance
  • gate-cli cex earn dual orders
  • cex_earn_list_structured_orders
  • gate-cli cex earn uni currencies
  • gate-cli cex earn uni rate
  • gate-cli cex earn uni lends
  • gate-cli cex earn staking orders
  • gate-cli cex futures account get
  • gate-cli cex futures market candlesticks
  • gate-cli cex futures market contract
  • gate-cli cex futures market funding-rate
  • gate-cli cex futures market orderbook
  • gate-cli cex futures market premium
  • gate-cli cex futures market tickers
  • gate-cli cex futures market trades
  • gate-cli cex futures market liquidations
  • gate-cli cex futures position list
  • gate-cli cex margin account list
  • gate-cli cex options account get
  • gate-cli cex rebate broker commissions
  • gate-cli cex rebate broker transactions
  • gate-cli cex rebate partner commissions
  • gate-cli cex rebate partner sub-list
  • gate-cli cex rebate partner transactions
  • gate-cli cex rebate user-info
  • gate-cli cex rebate sub-relation
  • gate-cli cex spot account get
  • gate-cli cex spot market candlesticks
  • gate-cli cex spot market orderbook
  • gate-cli cex spot market tickers
  • gate-cli cex spot market trades
  • gate-cli cex spot account book
  • gate-cli cex tradfi account assets
  • gate-cli cex unified account get
  • gate-cli cex unified query borrowable
  • gate-cli cex unified query estimate-rate
  • gate-cli cex unified mode get
  • gate-cli cex unified query transferable
  • gate-cli cex unified config leverage-get
  • gate-cli cex unified config discount-tiers
  • gate-cli cex unified account currencies
  • gate-cli cex unified loan interest
  • gate-cli cex unified loan records
  • gate-cli cex wallet balance total
执行操作(写入)
  • gate-cli cex unified loan create
  • gate-cli cex unified config collateral
  • gate-cli cex unified mode set
  • gate-cli cex unified config leverage-set

Authentication

身份验证

  • Interactive file setup: when
    GATE_API_KEY
    and
    GATE_API_SECRET
    are not both set on the host, run
    gate-cli config init
    to complete the wizard for API key, secret, profiles, and defaults (see gate-cli).
  • Env / flags:
    gate-cli config init
    is not required when credentials are already supplied — e.g. both
    GATE_API_KEY
    and
    GATE_API_SECRET
    set on the host, or
    --api-key
    /
    --api-secret
    where supported — never ask the user to paste secrets into chat.
  • Permissions: Alpha:Read, Earn:Read, Fx:Read, Margin:Read, Options:Read, Rebate:Read, Spot:Read, Tradfi:Read, Unified:Write, Wallet:Read
  • Portal: create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage
  • 交互式文件设置:当主机上未同时设置**
    GATE_API_KEY
    GATE_API_SECRET
    时,运行
    gate-cli config init
    **完成API密钥、密钥、配置文件和默认值的向导设置(参见 gate-cli)。
  • 环境变量/标志:当已提供凭据时,无需运行**
    gate-cli config init
    ** — 例如主机上已同时设置**
    GATE_API_KEY
    GATE_API_SECRET
    ,或在支持的情况下使用
    --api-key
    ** /
    --api-secret
    — 切勿要求用户在聊天中粘贴密钥。
  • 权限:Alpha:读取、Earn:读取、Fx:读取、Margin:读取、Options:读取、Rebate:读取、Spot:读取、Tradfi:读取、Unified:写入、Wallet:读取
  • 入口:在聊天外创建或轮换密钥:https://www.gate.com/myaccount/profile/api-key/manage

Installation Check

安装检查

  • Required:
    gate-cli
    (run
    sh ./setup.sh
    from this skill directory if missing; optional
    GATE_CLI_SETUP_MODE=release
    ).
  • Add
    $HOME/.openclaw/skills/bin
    to
    PATH
    if you invoke
    gate-cli
    by name (or the directory where
    setup.sh
    installs it).
  • Credentials: When
    GATE_API_KEY
    and
    GATE_API_SECRET
    are both set (non-empty) for the host, do not require
    gate-cli config init
    — that is equivalent valid config for
    gate-cli
    . When both are unset or empty, remind the operator to run
    gate-cli config init
    or to configure
    GATE_API_KEY
    /
    GATE_API_SECRET
    in the matching skill from the skill library (never ask the user to paste secrets into chat).
  • Sanity check: Do not proceed with authenticated calls until the CLI behaves as expected (e.g.
    gate-cli --version
    or a read-only
    gate-cli cex ...
    command from this skill); confirm credentials resolve before mutating operations.
  • 必需组件
    gate-cli
    (若缺失,可从本技能目录运行
    sh ./setup.sh
    ;可选设置
    GATE_CLI_SETUP_MODE=release
    )。
  • 如果直接通过名称调用
    gate-cli
    ,请将
    $HOME/.openclaw/skills/bin
    添加到**
    PATH
    **(或添加
    setup.sh
    安装
    gate-cli
    的目录)。
  • 凭据要求:当主机上的**
    GATE_API_KEY
    GATE_API_SECRET
    均已设置(非空)时,无需要求运行
    gate-cli config init
    ** — 这等同于
    gate-cli
    的有效配置。当两者均未设置或为空时,提醒操作员运行**
    gate-cli config init
    ** 从技能库中配置匹配技能的**
    GATE_API_KEY
    ** /
    GATE_API_SECRET
    (切勿要求用户在聊天中粘贴密钥)。
  • 完整性检查:在CLI运行符合预期(例如**
    gate-cli --version
    或本技能中的某个只读
    gate-cli cex ...
    **命令)之前,请勿进行已验证的调用;在执行变更操作前,确认凭据已解析。

Execution mode

执行模式

Read and strictly follow
references/gate-cli.md
, then execute module routing in this skill.
  • SKILL.md
    keeps orchestration/routing logic across account domains.
  • references/gate-cli.md
    is the authoritative
    gate-cli
    execution contract for module aggregation, partial degradation strategy, and unified mutation safeguards.
请阅读并严格遵循
references/gate-cli.md
,然后在本技能中执行模块路由。
  • SKILL.md
    维护跨账户领域的编排/路由逻辑。
  • references/gate-cli.md
    gate-cli
    执行契约的权威文档,涵盖模块聚合、部分降级策略和统一变更防护措施。

Sub-Modules

子模块

ModuleL1 SourceTool CountRead/WritePurpose
S1 Assets / Overviewgate-exchange-assets, gate-exchange-alpha10+Read onlyMulti-account balance panorama
S2 Risk / Margingate-exchange-unified, gate-exchange-marketanalysis6+Read onlyMargin ratio, liquidation price, unrealised PnL
S3 Earn / Yieldgate-exchange-simpleearn, gate-exchange-staking4Read onlyCurrent SimpleEarn and staking position/interest snapshots
S4 Affiliate / Rebategate-exchange-affiliate7Read onlyRebate user info (may be empty), partner commissions history, sub-relations
S5 Borrow / Transfer (Write)gate-exchange-unified62 Read + 4 WriteBorrow, set collateral, set leverage, switch mode
Note: TradFi tools (from gate-exchange-tradfi, 10 read tools) are all read-only and used for asset inventory queries. They are included in the deduplicated 58-tool count but not listed as a separate L1 module in the sub-module table above.
模块L1来源工具数量读/写用途
S1 资产/概览gate-exchange-assets, gate-exchange-alpha10+只读多账户余额全景
S2 风险/保证金gate-exchange-unified, gate-exchange-marketanalysis6+只读保证金比例、清算价格、未实现盈亏
S3 收益/收益率gate-exchange-simpleearn, gate-exchange-staking4只读当前SimpleEarn和质押头寸/利息快照
S4 联盟/返佣gate-exchange-affiliate7只读返佣用户信息(可能为空)、合作伙伴佣金历史、子账户关系
S5 借款/转账(写入)gate-exchange-unified62读 + 4写借款、设置抵押品、设置杠杆、切换模式
注:TradFi工具(来自gate-exchange-tradfi,10个只读工具)均为只读,用于资产库存查询。它们包含在去重后的58个工具计数中,但未在上述子模块表中列为单独的L1模块。

Routing Rules

路由规则

Design Principle

设计原则

User queries often span multiple dimensions (e.g. "check my earn interest and will I get liquidated" covers S3 and S2). Instead of forcing single-intent classification, this skill uses signal overlay: each of 5 signal dimensions is independently detected from the query, and the activated dimensions contribute their respective tool sets. The final tool set is the union of all activated signals, deduplicated before execution.
用户查询通常涉及多个维度(例如“查看我的收益利息以及是否会被清算”涵盖S3和S2)。本技能不强制进行单一意图分类,而是采用信号叠加:从查询中独立检测5个信号维度中的每一个,激活的维度贡献其对应的工具集。最终工具集是所有激活信号的并集,在执行前去重。

Signal Dimension Definitions

信号维度定义

SignalDimensionTrigger ConditionTrigger KeywordsTool Subset
S1Assets / OverviewUser asks about overall assets, multi-account balances, asset inventory; also covers read-only borrowable/rate inquiry (no execution intent) and transferable limit snapshotsassets, balance, account, how much, total assets, inventory; borrowable (inquiry only), transferable limit
gate-cli cex wallet balance total
,
gate-cli cex spot account get
,
gate-cli cex unified account get
,
gate-cli cex futures account get
,
gate-cli cex margin account list
,
gate-cli cex options account get
,
gate-cli cex earn uni lends
,
gate-cli cex earn staking assets
,
gate-cli cex alpha account balances
,
gate-cli cex tradfi account assets
; inquiry subset: +
gate-cli cex unified query borrowable
,
gate-cli cex unified query estimate-rate
,
gate-cli cex unified query transferable
S2Risk / MarginUser asks about liquidation, margin, liquidation price, unrealised PnL, position riskliquidation, margin, liquidation price, unrealised PnL, position, risk, margin call
gate-cli cex unified account get
,
gate-cli cex futures position list
,
gate-cli cex futures market tickers
,
gate-cli cex futures market contract
,
gate-cli cex futures market funding-rate
,
gate-cli cex futures market premium
S3Earn / YieldUser asks about existing SimpleEarn or staking positions, accrued interest and rewards (snapshot only, not product selection)earn position, staking position, interest, yield, rewards
gate-cli cex earn uni lends
,
gate-cli cex earn uni interest
,
gate-cli cex earn staking assets
,
gate-cli cex earn staking awards
(Note: does not include
list_uni_currencies
/
list_uni_rate
/
find_coin
which are product-selection tools; those requests route to smart earn)
S4Affiliate / RebateUser asks about affiliate status, partner data, commissionsrebate, affiliate, commission, partner, broker, referral
gate-cli cex rebate user-info
,
gate-cli cex rebate partner commissions
,
gate-cli cex rebate partner sub-list
,
gate-cli cex rebate partner transactions
,
gate-cli cex rebate sub-relation
,
gate-cli cex rebate broker commissions
,
gate-cli cex rebate broker transactions
S5Borrow / Transfer (Write)User has explicit execution intent: borrow amount, add margin, set collateral, switch mode. Does NOT activate for inquiry-only queries like "how much can I borrow" with negation like "don't borrow yet"borrow [amount], add margin, transfer to futures, set collateral, switch mode
gate-cli cex unified query borrowable
,
gate-cli cex unified query estimate-rate
,
gate-cli cex unified loan create
,
gate-cli cex unified config collateral
,
gate-cli cex unified mode set
,
gate-cli cex unified config leverage-set
信号维度触发条件触发关键词工具子集
S1资产/概览用户询问整体资产、多账户余额、资产库存;还涵盖只读的可借款额度/利率查询(无执行意图)和可转账限额快照资产、余额、账户、有多少、总资产、库存;可借款(仅查询)、可转账限额
gate-cli cex wallet balance total
,
gate-cli cex spot account get
,
gate-cli cex unified account get
,
gate-cli cex futures account get
,
gate-cli cex margin account list
,
gate-cli cex options account get
,
gate-cli cex earn uni lends
,
gate-cli cex earn staking assets
,
gate-cli cex alpha account balances
,
gate-cli cex tradfi account assets
;查询子集:+
gate-cli cex unified query borrowable
,
gate-cli cex unified query estimate-rate
,
gate-cli cex unified query transferable
S2风险/保证金用户询问清算、保证金、清算价格、未实现盈亏、头寸风险清算、保证金、清算价格、未实现盈亏、头寸、风险、保证金追缴
gate-cli cex unified account get
,
gate-cli cex futures position list
,
gate-cli cex futures market tickers
,
gate-cli cex futures market contract
,
gate-cli cex futures market funding-rate
,
gate-cli cex futures market premium
S3收益/收益率用户询问现有SimpleEarn或质押头寸、应计利息和奖励(仅快照,不涉及产品选择)收益头寸、质押头寸、利息、收益率、奖励
gate-cli cex earn uni lends
,
gate-cli cex earn uni interest
,
gate-cli cex earn staking assets
,
gate-cli cex earn staking awards
(注:不包括
list_uni_currencies
/
list_uni_rate
/
find_coin
等产品选择工具;此类请求将路由至智能收益技能)
S4联盟/返佣用户询问联盟状态、合作伙伴数据、佣金返佣、联盟、佣金、合作伙伴、经纪商、推荐
gate-cli cex rebate user-info
,
gate-cli cex rebate partner commissions
,
gate-cli cex rebate partner sub-list
,
gate-cli cex rebate partner transactions
,
gate-cli cex rebate sub-relation
,
gate-cli cex rebate broker commissions
,
gate-cli cex rebate broker transactions
S5借款/转账(写入)用户有明确的执行意图:借款金额、追加保证金、设置抵押品、切换模式。对于仅查询的请求(例如“我能借多少钱?先不借”),不激活此信号借款[金额]、追加保证金、转账至期货、设置抵押品、切换模式
gate-cli cex unified query borrowable
,
gate-cli cex unified query estimate-rate
,
gate-cli cex unified loan create
,
gate-cli cex unified config collateral
,
gate-cli cex unified mode set
,
gate-cli cex unified config leverage-set

Routing Flow

路由流程

Input: User Query
Output: activated_signals[] + params{action_type, accounts[]}

1. Parameter Extraction
 Extract accounts[] (account types mentioned, 0-N)
 Extract action_type (borrow / transfer / add margin / setting / none)

2. Signal Detection (each dimension independent, non-exclusive, multi-select)
 S1 <- contains asset/balance/account/inventory expressions
 S2 <- contains liquidation/margin/position/risk expressions
 S3 <- contains earn/staking position/interest/rewards expressions
 S4 <- contains rebate/affiliate/commission/partner expressions
 S5 <- contains borrow/transfer/add-margin/setting expressions AND execution intent

3. Fallback Rules (if no signal explicitly activated)
 Vague account intent (e.g. "check my account") -> default S1 (asset overview)
 Account + risk keywords (e.g. "is it safe") -> default S1 + S2

4. Execution Mode
 S5 not activated -> read-only mode (query and summarise)
 S5 activated -> read+write mode (query -> Action Draft -> confirm -> execute)

5. Tool Set Assembly
 Tool Set = Union(all activated signal tool subsets)
 Deduplicate same tool + same parameters
 Independent tools run in parallel; S5 write operations run serially after reads
输入:用户查询
输出:activated_signals[] + params{action_type, accounts[]}

1. 参数提取
 提取accounts[](提及的账户类型,0-N个)
 提取action_type(借款/转账/追加保证金/设置/无)

2. 信号检测(每个维度独立,非排他,可多选)
 S1 <- 包含资产/余额/账户/库存相关表述
 S2 <- 包含清算/保证金/头寸/风险相关表述
 S3 <- 包含收益/质押头寸/利息/奖励相关表述
 S4 <- 包含返佣/联盟/佣金/合作伙伴相关表述
 S5 <- 包含借款/转账/追加保证金/设置相关表述且有执行意图

3.  fallback规则(无明确激活信号时)
 模糊的账户意图(例如“查看我的账户”)→ 默认S1(资产概览)
 账户+风险关键词(例如“安全吗”)→ 默认S1 + S2

4. 执行模式
 未激活S5 → 只读模式(查询并汇总)
 已激活S5 → 读+写模式(查询 → 操作草案 → 确认 → 执行)

5. 工具集组装
 工具集 = 所有激活信号工具子集的并集
 对相同工具+相同参数去重
 独立工具并行运行;S5写操作在读取操作完成后串行运行

External Routing (Out of Scope)

外部路由(超出范围)

User IntentRoute To
Trade execution (spot/futures open/close)Trading copilot skill
Coin research, market analysis, newsMarket research skill
Idle fund allocation, product selection, APY comparisonSmart earn skill
Flash swap / coin exchangeFlash swap skill
Sub-account managementNot in scope
Asset weekly report, cross-period analysisNot supported by current API; guide to App reports
Total PnL ledger across all business linesData source calibration unreliable; display per-module snapshots
用户意图路由至
交易执行(现货/期货开仓/平仓)交易 copilote 技能
币种研究、市场分析、新闻市场研究技能
闲置资金配置、产品选择、APY对比智能收益技能
闪电兑换/币种兑换闪电兑换技能
子账户管理不在范围内
资产周报、跨周期分析当前API不支持;引导至App报告
全业务线总盈亏 ledger数据源校准不可靠;显示各模块快照

Routing Example Table

路由示例表

User QueryaccountsActivated SignalsExplanation
"Check my account"[]S1 (fallback)No explicit dimension keyword; fallback to asset overview
"How much do I have, will I get liquidated?"[]S1 + S2"how much" triggers S1, "liquidated" triggers S2
"Is my unified margin sufficient?"[unified]S2"margin" triggers risk
"Show liquidation prices and unrealised PnL"[]S2"liquidation price / unrealised PnL" triggers risk
"How much did earn and staking make?"[]S3"earn / staking / how much" triggers yield
"Should I put idle funds in SimpleEarn or staking?"[]Route to smart earn; this skill does not do fund allocation
"How much rebate do I have?"[]S4"rebate" triggers affiliate
"Margin is low, help me add margin"[]S2 + S5"margin low" triggers S2, "add margin" triggers S5 write
"How much can I borrow? Don't borrow yet"[]S1Negation of execution -> does NOT activate S5; uses borrowable + estimate_rate (inquiry subset)
"How much can I borrow? Borrow 500 USDT"[]S5Execution intent -> query then Action Draft -> confirm -> create_loan
"How much USDT can I transfer out? (don't transfer)"[unified]S1Transferable limit read-only -> transferable + unified_accounts; not a transfer execution
"Show total assets + futures margin together (no analysis)"[]S1 + S2Factual snapshot, no S3, no health/PnL narrative
"Make me an asset weekly report / total PnL ledger"[]Not accepted: API cannot support reliable asset analysis or total PnL; explain boundary and guide to App reports
"About to get liquidated, any spare spot balance? Can I add margin?"[]S2 + S1 + S5"liquidated" triggers S2, "spot balance" triggers S1, "add margin" triggers S5
用户查询accounts激活信号说明
“查看我的账户”[]S1(fallback)无明确维度关键词;fallback至资产概览
“我有多少钱,会被清算吗?”[]S1 + S2“有多少钱”触发S1,“清算”触发S2
“我的统一保证金足够吗?”[unified]S2“保证金”触发风险维度
“显示清算价格和未实现盈亏”[]S2“清算价格/未实现盈亏”触发风险维度
“收益和质押赚了多少钱?”[]S3“收益/质押/有多少钱”触发收益率维度
“我应该把闲置资金放在SimpleEarn还是质押里?”[]路由至智能收益技能;本技能不处理资金配置
“我有多少返佣?”[]S4“返佣”触发联盟维度
“保证金不足,帮我追加保证金”[]S2 + S5“保证金不足”触发S2,“追加保证金”触发S5写入操作
“我能借多少钱?先不借”[]S1否定执行意图 → 不激活S5;使用可借款额度+预估利率(查询子集)
“我能借多少钱?借500 USDT”[]S5有执行意图 → 查询后生成操作草案 → 确认 → 创建借款
“我能转出多少USDT?(先不转)”[unified]S1可转账限额为只读 → 可转账额度+统一账户;非转账执行操作
“一起显示总资产+期货保证金(无需分析)”[]S1 + S2事实快照,不涉及S3,无健康/盈亏说明
“给我生成资产周报/总盈亏ledger”[]不支持:API无法提供可靠的资产分析或总盈亏;说明边界并引导至App报告
“即将被清算,有没有可用的现货余额?我能追加保证金吗?”[]S2 + S1 + S5“清算”触发S2,“现货余额”触发S1,“追加保证金”触发S5

L1/L2 Coexistence Strategy

L1/L2共存策略

Some user queries can be satisfied by a single L1 skill's tools (e.g. "how much do I have" only needs a few assets tools). This L2 provides a more comprehensive aggregated report through cross-L1 orchestration.
  • Recommended strategy: All "account/asset/risk" requests enter this L2 as a unified entry point. If the sub-intent only needs a single L1's tool set, call that subset only and output normally (short-circuit optimisation).
  • Principle: Unified entry ensures consistent user experience for all account/asset/risk queries; internally call 1-N tools as needed without forcing full orchestration.
部分用户查询可通过单个L1技能的工具满足(例如“我有多少钱”仅需几个资产工具)。此L2技能通过跨L1编排提供更全面的聚合报告。
  • 推荐策略:所有“账户/资产/风险”请求均以此L2技能作为统一入口。如果子意图仅需单个L1的工具集,则仅调用该子集并正常输出(短路优化)。
  • 原则:统一入口确保所有账户/资产/风险查询的用户体验一致;内部根据需要调用1-N个工具,无需强制全量编排。

Mixed Intent Handling

混合意图处理

When a user query contains both account/risk intent and other L2 intents (e.g. "check my account, then buy BTC"):
  1. Split into two segments: account/risk part is handled by this skill and output conclusions
  2. Trading/research part routes to the corresponding L2 (trading copilot / market research), each executes independently
  3. Example: "Check my account, then buy some BTC" -> this skill completes asset overview -> prompts "trading part has been routed to trading copilot"
当用户查询同时包含账户/风险意图和其他L2意图(例如“查看我的账户,然后买入BTC”):
  1. 拆分为两部分:账户/风险部分由本技能处理并输出结论
  2. 交易/研究部分路由至相应的L2技能(交易copilote / 市场研究),各自独立执行
  3. 示例:“查看我的账户,然后买一些BTC” → 本技能完成资产概览 → 提示“交易部分已路由至交易copilote”

Edge Case Handling

边缘情况处理

ScenarioHandling
User says "check my account" with no detailsFallback S1 (asset overview), output full asset panorama
User says "is it safe" / "am I OK"Fallback S1 + S2, output asset panorama + margin/liquidation assessment
User asks about sub-accountsExplicitly state "this skill does not cover sub-account management"
Write operation parameters incomplete (e.g. "borrow" without amount)Ask to complete: "Please confirm the currency and amount to borrow"; do not guess
Multilingual / mixed Chinese-English promptsParse intent and parameters normally; if identifiable as account/asset/risk, enter this skill
User asks "which earn product is best"Product recommendation scope; route to smart earn. This skill only queries existing positions/yields
gate-cli cex rebate user-info
returns an empty object
Still produce the S4 section from
gate-cli cex rebate partner commissions
and other S4 tools; do not treat empty user_info as "no affiliate data". See Domain Knowledge: Affiliate / rebate data (S4).
场景处理方式
用户说“查看我的账户”但无细节Fallback至S1(资产概览),输出完整资产全景
用户说“安全吗” / “我没问题吧”Fallback至S1 + S2,输出资产全景 + 保证金/清算评估
用户询问子账户明确说明“本技能不涵盖子账户管理”
写入操作参数不完整(例如“借款”但未说明金额)请求补充:“请确认借款的币种和金额”;请勿猜测
多语言/中英混合提示正常解析意图和参数;如果可识别为账户/资产/风险相关,则进入本技能
用户询问“哪种收益产品最好”属于产品推荐范围;路由至智能收益技能。本技能仅查询现有头寸/收益率
gate-cli cex rebate user-info
返回空对象
仍使用
gate-cli cex rebate partner commissions
和其他S4工具生成S4部分;请勿将空user_info视为“无联盟数据”。参见领域知识:联盟/返佣数据(S4)。

Execution

执行流程

Read-Only Scenarios (S1-S4, no S5)

只读场景(S1-S4,无S5)

  1. Activate signal dimensions from user query
  2. Assemble deduplicated tool set from all activated dimensions
  3. Execute all tools in parallel (no serial dependencies)
  4. LLM aggregates multi-source results, annotates data timestamp and source
  5. Output structured report per activated dimension
  1. 从用户查询中激活信号维度
  2. 从所有激活维度组装去重后的工具集
  3. 并行执行所有工具(无串行依赖)
  4. LLM聚合多源结果,标注数据时间戳和来源
  5. 按激活维度输出结构化报告

Write Scenarios (S5 activated)

写入场景(已激活S5)

  1. Phase 1 (Parallel Read): Execute S1/S2 tools to get current account state
  2. LLM evaluates feasibility and generates Action Draft (follow G. Write operation grading: medium-risk = risk note + irreversibility for mode switch; high-risk borrow/repay = amount + currency + rate)
  3. Present Action Draft to user with key parameters and risk notes
  4. Wait for explicit user confirmation (Y/N)
  5. Phase 2 (Execute): Submit write tool call only after confirmation
  6. Output execution result
  1. 阶段1(并行读取):执行S1/S2工具获取当前账户状态
  2. LLM评估可行性并生成操作草案(遵循G. 写入操作分级:中等风险 = 风险提示 + 模式切换不可撤销;高风险借款/还款 = 金额 + 币种 + 利率)
  3. 向用户展示操作草案,包含关键参数和风险提示
  4. 等待用户明确确认(是/否)
  5. 阶段2(执行):仅在确认后提交写入工具调用
  6. 输出执行结果

Tool Deduplication Rules

工具去重规则

  • Same tool + same parameters within one request: execute once, reuse result for multiple aggregation steps
  • Example:
    gate-cli cex unified account get
    needed by both S1 and S2 only executes once
  • 同一请求中相同工具+相同参数:仅执行一次,结果用于多个聚合步骤
  • 示例:S1和S2均需要的
    gate-cli cex unified account get
    仅执行一次

gate-cli command index

gate-cli命令索引

Full Deduplicated Tool Inventory (58 tools: 54 read + 4 write)

全量去重工具清单(58个工具:54个读 + 4个写)

Assets Domain (11 tools, all read)

资产领域(11个工具,均为读)

#Tool NameR/WPurpose
1
gate-cli cex wallet balance total
RTotal balance in USDT equivalent
2
gate-cli cex spot account get
RSpot account per-currency balances
3
gate-cli cex unified account get
RUnified account equity/margin/loans
4
gate-cli cex futures account get
RFutures account available balance
5
gate-cli cex options account get
ROptions account balance
6
gate-cli cex margin account list
RIsolated margin accounts
7
gate-cli cex tradfi account assets
RTradFi account equity
8
gate-cli cex earn dual balance
RDual investment balance
9
gate-cli cex earn dual orders
RDual investment orders
10
cex_earn_list_structured_orders
(no
gate-cli
mapping in
gate-cli/cmd/cex
; see
MCP_LEGACY_TOOL_RESOLUTION.md
§二)
RStructured product orders
11
gate-cli cex spot account book
RSpot account ledger
#工具名称读/写用途
1
gate-cli cex wallet balance total
R以USDT计价的总余额
2
gate-cli cex spot account get
R现货账户各币种余额
3
gate-cli cex unified account get
R统一账户权益/保证金/贷款
4
gate-cli cex futures account get
R期货账户可用余额
5
gate-cli cex options account get
R期权账户余额
6
gate-cli cex margin account list
R逐仓保证金账户
7
gate-cli cex tradfi account assets
RTradFi账户权益
8
gate-cli cex earn dual balance
R双币投资余额
9
gate-cli cex earn dual orders
R双币投资订单
10
cex_earn_list_structured_orders
gate-cli/cmd/cex
中无
gate-cli
映射;参见
MCP_LEGACY_TOOL_RESOLUTION.md
§二)
R结构化产品订单
11
gate-cli cex spot account book
R现货账户ledger

Unified Account Domain (14 tools, 10 read + 4 write)

统一账户领域(14个工具,10个读 + 4个写)

#Tool NameR/WPurpose
12
gate-cli cex unified account get
RUnified account equity/margin ratio/loan balance
13
gate-cli cex unified mode get
RCurrent unified account mode
14
gate-cli cex unified query borrowable
RBorrowable limit per currency
15
gate-cli cex unified query transferable
RTransferable limit
16
gate-cli cex unified query estimate-rate
RHourly estimated unified-account borrow rate per currency (API string decimals; not annualized APR/APY). See Domain Knowledge: Unified account estimated borrow rate.
17
gate-cli cex unified account currencies
RSupported unified currencies
18
gate-cli cex unified loan records
RLoan records
19
gate-cli cex unified loan interest
RLoan interest records
20
gate-cli cex unified config leverage-get
RPer-currency leverage setting
21
gate-cli cex unified config discount-tiers
RCollateral discount tiers
22
gate-cli cex unified mode set
WSwitch unified account mode
23
gate-cli cex unified loan create
WExecute borrow/repay
24
gate-cli cex unified config leverage-set
WSet per-currency leverage
25
gate-cli cex unified config collateral
WSet collateral currencies
#工具名称读/写用途
12
gate-cli cex unified account get
R统一账户权益/保证金比例/贷款余额
13
gate-cli cex unified mode get
R当前统一账户模式
14
gate-cli cex unified query borrowable
R各币种可借款额度
15
gate-cli cex unified query transferable
R可转账限额
16
gate-cli cex unified query estimate-rate
R各币种统一账户每小时预估借款利率(API返回字符串小数;年化APR/APY)。参见领域知识:统一账户预估借款利率。
17
gate-cli cex unified account currencies
R统一账户支持的币种
18
gate-cli cex unified loan records
R贷款记录
19
gate-cli cex unified loan interest
R贷款利息记录
20
gate-cli cex unified config leverage-get
R各币种杠杆设置
21
gate-cli cex unified config discount-tiers
R抵押品折扣等级
22
gate-cli cex unified mode set
W切换统一账户模式
23
gate-cli cex unified loan create
W执行借款/还款
24
gate-cli cex unified config leverage-set
W设置各币种杠杆
25
gate-cli cex unified config collateral
W设置抵押币种

SimpleEarn Domain (5 tools, all read)

SimpleEarn领域(5个工具,均为读)

#Tool NameR/WPurpose
26
gate-cli cex earn uni currencies
RSimpleEarn supported currencies
27
gate-cli cex earn uni currency
RSingle currency SimpleEarn details
28
gate-cli cex earn uni lends
RUser SimpleEarn positions
29
gate-cli cex earn uni interest
RSimpleEarn interest earnings
30
gate-cli cex earn uni rate
RSimpleEarn APY rates
#工具名称读/写用途
26
gate-cli cex earn uni currencies
RSimpleEarn支持的币种
27
gate-cli cex earn uni currency
R单个币种SimpleEarn详情
28
gate-cli cex earn uni lends
R用户SimpleEarn头寸
29
gate-cli cex earn uni interest
RSimpleEarn利息收益
30
gate-cli cex earn uni rate
RSimpleEarn APY利率

Staking Domain (4 tools, all read)

质押领域(4个工具,均为读)

#Tool NameR/WPurpose
31
gate-cli cex earn staking assets
RStaking positions
32
gate-cli cex earn staking awards
RStaking reward records
33
gate-cli cex earn staking find
RStakeable coin search
34
gate-cli cex earn staking orders
RStaking order history
#工具名称读/写用途
31
gate-cli cex earn staking assets
R质押头寸
32
gate-cli cex earn staking awards
R质押奖励记录
33
gate-cli cex earn staking find
R可质押币种搜索
34
gate-cli cex earn staking orders
R质押订单历史

Market Analysis Domain (12 tools, all read)

市场分析领域(12个工具,均为读)

#Tool NameR/WPurpose
35
gate-cli cex spot market orderbook
RSpot order book
36
gate-cli cex spot market candlesticks
RSpot K-line data
37
gate-cli cex spot market tickers
RSpot ticker snapshot
38
gate-cli cex spot market trades
RSpot trade records
39
gate-cli cex futures market contract
RFutures contract specs
40
gate-cli cex futures market orderbook
RFutures order book
41
gate-cli cex futures market candlesticks
RFutures K-line data
42
gate-cli cex futures market tickers
RFutures ticker (mark price)
43
gate-cli cex futures market trades
RFutures trade records
44
gate-cli cex futures market funding-rate
RFunding rate
45
gate-cli cex futures market liquidations
RLiquidation orders
46
gate-cli cex futures market premium
RBasis/premium index
#工具名称读/写用途
35
gate-cli cex spot market orderbook
R现货订单簿
36
gate-cli cex spot market candlesticks
R现货K线数据
37
gate-cli cex spot market tickers
R现货行情快照
38
gate-cli cex spot market trades
R现货交易记录
39
gate-cli cex futures market contract
R期货合约规格
40
gate-cli cex futures market orderbook
R期货订单簿
41
gate-cli cex futures market candlesticks
R期货K线数据
42
gate-cli cex futures market tickers
R期货行情(标记价格)
43
gate-cli cex futures market trades
R期货交易记录
44
gate-cli cex futures market funding-rate
R资金费率
45
gate-cli cex futures market liquidations
R清算订单
46
gate-cli cex futures market premium
R基差/溢价指数

Futures Positions (1 tool, read)

期货头寸(1个工具,读)

#Tool NameR/WPurpose
47
gate-cli cex futures position list
RAll futures positions (unrealised PnL, liquidation price)
#工具名称读/写用途
47
gate-cli cex futures position list
R所有期货头寸(未实现盈亏、清算价格)

Affiliate Domain (7 tools, all read)

联盟领域(7个工具,均为读)

#Tool NameR/WPurpose
48
gate-cli cex rebate user-info
RUser rebate summary (may return an empty object; rely on commissions history when empty)
49
gate-cli cex rebate sub-relation
RUser affiliate relationship
50
gate-cli cex rebate partner sub-list
RPartner client list
51
gate-cli cex rebate partner commissions
RPartner commission history
52
gate-cli cex rebate partner transactions
RClient transaction history
53
gate-cli cex rebate broker commissions
RBroker commission history
54
gate-cli cex rebate broker transactions
RBroker transaction history
#工具名称读/写用途
48
gate-cli cex rebate user-info
R用户返佣汇总(可能返回空对象;为空时依赖佣金历史)
49
gate-cli cex rebate sub-relation
R用户联盟关系
50
gate-cli cex rebate partner sub-list
R合作伙伴客户列表
51
gate-cli cex rebate partner commissions
R合作伙伴佣金历史
52
gate-cli cex rebate partner transactions
R客户交易历史
53
gate-cli cex rebate broker commissions
R经纪商佣金历史
54
gate-cli cex rebate broker transactions
R经纪商交易历史

Alpha Domain (4 tools, all read)

Alpha领域(4个工具,均为读)

#Tool NameR/WPurpose
55
gate-cli cex alpha market currencies
RAlpha supported currencies
56
gate-cli cex alpha market tokens
RAlpha token list
57
gate-cli cex alpha market tickers
RAlpha ticker snapshot
58
gate-cli cex alpha account balances
RUser Alpha positions
#工具名称读/写用途
55
gate-cli cex alpha market currencies
RAlpha支持的币种
56
gate-cli cex alpha market tokens
RAlpha代币列表
57
gate-cli cex alpha market tickers
RAlpha行情快照
58
gate-cli cex alpha account balances
R用户Alpha头寸

Domain Knowledge

领域知识

Key Value Propositions

核心价值主张

  • Single-query visibility into "where is my money, earn/affiliate snapshots, will I get liquidated" without multi-page navigation (does not produce asset weekly reports, total PnL ledger, or idle fund allocation plans)
  • 58 tool calls orchestrated by scenario with parallel/serial awareness; conclusions and data sources are traceable
  • Write operations (borrow/settings) require mandatory confirmation; zero risk of accidental execution; read operations are fully parallelised for fast response
  • All tools require API Key authentication; data is limited to the authenticated user's own view
  • 单次查询即可查看“资金分布、收益/联盟快照、是否会被清算”,无需多页面导航(不生成资产周报、总盈亏ledger或闲置资金配置方案)
  • 58个工具调用按场景编排,支持并行/串行执行;结论和数据源可追溯
  • 写入操作(借款/设置)需强制确认;无意外执行风险;读操作完全并行以快速响应
  • 所有工具均需API密钥验证;数据仅限于已验证用户的自有视图

Target Users

目标用户

  • Active traders with open positions who need a quick asset overview
  • Users concerned about asset security and risk control (margin, liquidation)
  • Users who periodically review earn/staking yields and affiliate commission summaries
  • Advanced users who utilise unified-account borrowing, leverage, and collateral features
  • 持有未平仓头寸的活跃交易者,需要快速查看资产概览
  • 关注资产安全和风险控制(保证金、清算)的用户
  • 定期查看收益/质押收益率和联盟佣金汇总的用户
  • 使用统一账户借款、杠杆和抵押品功能的高级用户

Key Constraints

关键约束

  • This skill covers main account only; sub-account management is out of scope.
  • Margin ratio and liquidation price calculations are reference values; always note "subject to the exchange's actual liquidation rules."
  • Asset data has snapshot latency; always annotate the data timestamp in output.
  • Borrowing incurs interest; users must assess their own repayment capacity.
  • Asset data is limited to the user's own view and must not be leaked to other contexts.
  • When a query returns no meaningful business data (empty list, no records), do not list or emphasise
    cex_*
    tool names in user-facing output; use natural language like "no records found" instead.
  • 本技能仅覆盖主账户;子账户管理不在范围内。
  • 保证金比例和清算价格计算为参考值;需始终注明“以交易所实际清算规则为准”。
  • 资产数据存在快照延迟;需始终在输出中标注数据时间戳。
  • 借款会产生利息;用户必须评估自身还款能力。
  • 资产数据仅限于用户自有视图,不得泄露至其他场景。
  • 当查询返回无意义的业务数据(空列表、无记录)时,在面向用户的输出中不得列出或强调
    cex_*
    工具名称;使用自然语言如“未找到记录”代替。

Capability Boundaries (What This Skill Does NOT Do)

能力边界(本技能不支持的操作)

  • Does NOT execute trades (spot/futures open/close) — route to trading copilot
  • Does NOT perform coin research, market analysis, or news — route to market research
  • Does NOT recommend earn products or handle subscriptions — route to smart earn
  • Does NOT manage sub-accounts
  • Does NOT produce asset weekly reports or cross-period asset analysis (API limitation)
  • Does NOT produce a total PnL ledger across all business lines (inconsistent data sources)
  • Does NOT provide idle fund allocation advice or product comparison — route to smart earn
  • 不执行交易(现货/期货开仓/平仓)— 路由至交易copilote
  • 不进行币种研究、市场分析或新闻查询 — 路由至市场研究技能
  • 不推荐收益产品或处理订阅 — 路由至智能收益技能
  • 不管理子账户
  • 不生成资产周报或跨周期资产分析(API限制)
  • 不生成全业务线总盈亏ledger(数据源不一致)
  • 不提供闲置资金配置建议或产品对比 — 路由至智能收益技能

Unified account estimated borrow rate (
gate-cli cex unified query estimate-rate
)

统一账户预估借款利率(
gate-cli cex unified query estimate-rate

  • Semantics (Gate API): The tool returns estimated borrow interest rates for the current hour, per currency, as string decimals (e.g.
    "0.000002"
    ). This matches the public API contract: hourly estimate, not a fixed annual quote.
  • User-facing output: Always state that the value is a hourly estimated rate (or equivalent). Do not present the raw number as annualized APR/APY unless you perform an explicit conversion and label it clearly as a reference only (e.g. simple scaling: hourly × 24 × 365 — actual accrual follows platform rules).
  • Distinction: SimpleEarn tools such as
    gate-cli cex earn uni rate
    expose product APY-style figures; they are a different product line from unified-account borrow estimates. Do not mix units in one sentence without naming each source.
  • 语义(Gate API):该工具返回当前小时的预估借款利率,按币种划分,格式为字符串小数(例如
    "0.000002"
    )。这符合公开API契约:小时预估利率,而非固定年化报价。
  • 面向用户的输出:需始终说明该值为每小时预估利率(或等效表述)。不得将原始数字作为年化APR/APY展示,除非进行明确转换并清晰标注为仅供参考(例如简单换算:小时利率 × 24 × 365 — 实际计息遵循平台规则)。
  • 区别:SimpleEarn工具如
    gate-cli cex earn uni rate
    展示产品APY风格的数值;它们与统一账户借款预估利率属于不同产品线。在同一句话中混合单位时,必须分别注明来源。

Common Misconceptions

常见误解

MisconceptionReality
The number from
gate-cli cex unified query estimate-rate
is an annual percentage (APR)
It is an hourly estimated borrow rate per currency. Label it as hourly; only annualize with explicit conversion and “reference only” wording if the user asks.
"Check my account and buy BTC" will execute trades via this skillThis skill only handles account/asset/risk queries and limited write operations (borrow/settings). Trading execution routes to the trading copilot.
Liquidation warning equals the actual liquidation lineThis skill evaluates risk based on snapshot data. Always note "subject to the exchange's actual liquidation rules."
This skill can query or manage sub-accountsThis skill covers main account only; sub-account management is out of scope.
"Should I put idle funds in SimpleEarn or staking" will be answered by this skillProduct selection and fund allocation route to the smart earn skill. This skill only provides position and yield snapshots for existing holdings.
Empty
gate-cli cex rebate user-info
means I have no commissions
Partner commission rows may still exist in
gate-cli cex rebate partner commissions
; empty user_info does not block an S4 report.
误解实际情况
gate-cli cex unified query estimate-rate
返回的数字是年化百分比(APR)
它是各币种的每小时预估借款利率。标注为小时利率;仅当用户要求时,才可进行明确转换并标注“仅供参考”后年化。
“查看我的账户并买入BTC”会通过本技能执行交易本技能仅处理账户/资产/风险查询和有限的写入操作(借款/设置)。交易执行需路由至交易copilote。
清算预警等于实际清算线本技能基于快照数据评估风险。需始终注明“以交易所实际清算规则为准”。
本技能可查询或管理子账户本技能仅覆盖主账户;子账户管理不在范围内。
“我应该把闲置资金放在SimpleEarn还是质押里”会由本技能解答产品选择和资金配置需路由至智能收益技能。本技能仅提供现有持仓的头寸和收益率快照。
空的
gate-cli cex rebate user-info
意味着我没有佣金
gate-cli cex rebate partner commissions
中可能仍存在合作伙伴佣金记录;空user_info并不代表没有佣金数据。

Affiliate / rebate data (S4)

联盟/返佣数据(S4)

  • gate-cli cex rebate user-info
    may return an empty object.
    You can still build a meaningful S4 report from
    gate-cli cex rebate partner commissions
    (and other S4 read tools such as partner sub list and transaction history). Empty
    user_info
    does not mean there is no commission data.
  • Source of truth for commission flows:
    gate-cli cex rebate partner commissions
    returns historical commission rows.
    commissionAsset
    is commonly USDT or POINT; rows may also carry a source dimension such as FUTURES, SPOT, TradFi, or ALPHA (names as returned by the API).
  • No fabricated lifetime rebate totals: When
    user_info
    does not expose a ready-made cumulative rebate figure, do not invent a single "total rebate" number. To state aggregate USDT and POINT from history alone, you must page through the full history (use the API's offset/limit parameters, e.g. limit 100 per request), repeat until no more rows, then sum
    commissionAmount
    grouped by
    commissionAsset
    . If the session has not completed all pages, state that explicitly and do not guess totals.
  • Official totals: Direct users to the Gate App or Web partner or rebate center for authoritative cumulative figures if they need a single official number without full pagination in the session.
  • Optional follow-up: If the user asks, you may offer to continue pagination for rebate only and report USDT total and POINT total from commission history. Do not add those rebate totals to SimpleEarn, staking, or other yield sections (no cross-section "total income" mixing).
  • gate-cli cex rebate user-info
    可能返回空对象
    。您仍可通过**
    gate-cli cex rebate partner commissions
    (以及其他S4读工具如合作伙伴子账户列表和交易历史)生成有意义的S4报告。空user_info不**代表没有佣金数据。
  • 佣金流的真实来源
    gate-cli cex rebate partner commissions
    返回历史佣金记录。
    commissionAsset
    通常为USDT
    POINT;记录还可能包含source维度,例如FUTURES、SPOT、TradFi或ALPHA(名称与API返回一致)。
  • 不得编造终身返佣总额:当user_info未提供现成的累计返佣数值时,不得编造单一“总返佣”数字。仅通过历史记录统计USDT和POINT总额时,必须遍历完整历史记录(使用API的offset/limit参数,例如每页限制100条),重复请求直至无更多记录,然后
    commissionAsset
    分组汇总
    commissionAmount
    。如果会话未完成所有分页,需明确说明且不得猜测总额。
  • 官方总额:如果用户需要单一官方数字,引导用户前往Gate App或网页的合作伙伴或返佣中心获取权威累计数据。
  • 可选后续操作:如果用户要求,您可提供继续分页查询返佣记录并报告佣金历史中的USDT总额和POINT总额不得将这些返佣总额与SimpleEarn、质押或其他收益部分合并(不得跨模块混合“总收入”)。

Reference Documents

参考文档

  • gate-runtime-rules.md
    — Exchange runtime rules (precision, price limits), referenced before executing borrow operations
Note: Unified account specifications (margin ratio calculation, borrowing rules, mode switching constraints) are embedded in the Domain Knowledge and Safety Rules sections of this SKILL.md. For detailed unified-account rules, refer to the
gate-exchange-unified
L1 skill.
  • gate-runtime-rules.md
    — 交易所运行时规则(精度、价格限制),执行借款操作前需参考
注:统一账户规格(保证金比例计算、借款规则、模式切换限制)已嵌入本SKILL.md的领域知识和安全规则部分。如需详细的统一账户规则,请参考
gate-exchange-unified
L1技能。

Safety Rules

安全规则

G. Write Operation Confirmation Mechanism and Safety Rules

G. 写入操作确认机制和安全规则

Category: Strong confirmation · Action Draft — All unified-account mutations below use an Action Draft plus an explicit user confirmation in the immediately preceding turn. There is no silent execution.
分类:强确认 · 操作草案 — 以下所有统一账户变更操作均使用操作草案加上用户在上一轮对话中的明确确认。无静默执行。

Write operation grading (by risk level)

写入操作分级(按风险等级)

Risk levelOperation typeInvolved toolsConfirmation requirement
MediumSwitch unified account mode / set per-currency leverage / set collateral
gate-cli cex unified mode set
,
gate-cli cex unified config leverage-set
,
gate-cli cex unified config collateral
Single confirmation plus a risk disclosure in the Action Draft. If the operation includes mode switch (
gate-cli cex unified mode set
), the draft must state that the mode change is irreversible (or equivalent clear wording).
HighLending — borrow or repay
gate-cli cex unified loan create
Action Draft must list amount, currency, and estimated or applicable interest rate (from
gate-cli cex unified query estimate-rate
hourly estimate — or API response), then user confirmation before execution.
Implementation notes
  • gate-cli cex unified query estimate-rate
    :
    Treat returned rates as hourly estimates when quoting to the user or filling Action Drafts (see Domain Knowledge: Unified account estimated borrow rate).
  • Medium vs High: Medium-risk tools still use an Action Draft; the difference is emphasis — medium-risk settings require a concise risk tip (and irreversibility when switching mode). High-risk lending requires the financial fields (amount, currency, rate) to be explicit in the draft before confirmation.
  • One tool per confirmation batch if parameters differ; do not bundle unrelated writes under one generic “OK”.
风险等级操作类型涉及工具确认要求
中等切换统一账户模式 / 设置各币种杠杆 / 设置抵押品
gate-cli cex unified mode set
,
gate-cli cex unified config leverage-set
,
gate-cli cex unified config collateral
单次确认加上操作草案中的风险披露。如果操作包含模式切换
gate-cli cex unified mode set
),草案必须说明模式变更不可撤销(或等效明确表述)。
借贷 — 借款或还款
gate-cli cex unified loan create
操作草案必须列出金额币种预估或适用利率(来自
gate-cli cex unified query estimate-rate
每小时预估利率 — 或API响应),然后用户确认后方可执行。
实现说明
  • gate-cli cex unified query estimate-rate
    :在向用户报价或填写操作草案时,将返回的利率视为每小时预估利率(参见领域知识:统一账户预估借款利率)。
  • 中等 vs 高风险:中等风险工具仍需使用操作草案;区别在于重点 — 中等风险设置需简洁的风险提示(切换模式时需说明不可撤销)。高风险借贷需在草案中明确列出财务字段(金额、币种、利率)后方可确认。
  • 如果参数不同,每个工具单独确认;不得将无关写入操作捆绑在一个通用“确认”下。

User Confirmation Requirement

用户确认要求

All write operations require explicit user confirmation before execution. The confirmation flow is:
  1. Action Draft: Present operation type, target, parameters, estimated impact, and risk note (see grading table above for medium vs high content)
  2. Wait for Confirmation: User must reply with explicit approval (Y / Confirm)
  3. Execute: Submit write tool call only after approval
  4. Single-use: Confirmation is consumed after one use; parameter changes require re-confirmation
  5. Per-step: Multi-step write operations require confirmation for each step separately
所有写入操作需在执行前获得用户明确确认。确认流程如下:
  1. 操作草案:展示操作类型、目标、参数、预估影响和风险提示(参见上述分级表中中等/高风险的内容要求)
  2. 等待确认:用户必须回复明确批准(是/确认)
  3. 执行:仅在批准后提交写入工具调用
  4. 单次有效:确认仅一次有效;参数变更需重新确认
  5. 分步确认:多步骤写入操作需分步确认

Write Operation Classification (summary)

写入操作分类(摘要)

Risk LevelOperationsToolsConfirmation
MediumSwitch unified mode, set leverage, set collateral
gate-cli cex unified mode set
,
gate-cli cex unified config leverage-set
,
gate-cli cex unified config collateral
Action Draft + single confirmation + risk note; mode switch: irreversibility must be stated
HighBorrow / Repay
gate-cli cex unified loan create
Action Draft with amount, currency, interest rate → user confirmation
风险等级操作工具确认要求
中等切换统一模式、设置杠杆、设置抵押品
gate-cli cex unified mode set
,
gate-cli cex unified config leverage-set
,
gate-cli cex unified config collateral
操作草案 + 单次确认 + 风险提示;模式切换:必须说明不可撤销
借款/还款
gate-cli cex unified loan create
包含金额、币种、利率的操作草案 → 用户确认

No-Confirmation Guard

无确认防护

Without explicit user confirmation, no write operation is executed. Only read and query operations are allowed.
在未获得用户明确确认的情况下,不得执行任何写入操作。仅允许读和查询操作。

Stale Confirmation Handling

过期确认处理

If parameters change after confirmation (different currency, amount, or operation type), the previous confirmation is invalidated and a new Action Draft must be presented.
如果确认后参数发生变更(币种、金额或操作类型不同),之前的确认失效,需重新展示操作草案。

Hard Blocking Rules

硬阻断规则

  • NEVER call mutation tools without explicit confirmation from the immediately previous user turn
  • NEVER guess parameters; if amount, currency, or direction is missing, ask the user
  • NEVER fabricate data; if a tool call fails, degrade gracefully and note "data temporarily unavailable"
  • Liquidation warnings are reference values only; always state "subject to the exchange's actual rules"
  • 切勿在未获得用户上一轮对话明确确认的情况下调用变更工具
  • 切勿猜测参数;如果金额、币种或方向缺失,询问用户
  • 切勿编造数据;如果工具调用失败,优雅降级并注明“数据暂时不可用”
  • 清算预警仅为参考值;需始终说明“以交易所实际规则为准”

Error Handling

错误处理

Error TypeHandling Strategy
Single read tool timeout/errorSkip that dimension, note "this section is temporarily unavailable", continue other dimensions
Write tool failureDo not retry; explain failure reason and guide user to App/Web for manual operation
Missing required parameter (write)Ask user to specify (e.g. "Please confirm the currency and amount to borrow")
Unrecognisable intentFall back to S1 (asset overview)
Tool call returns empty dataUse natural language "no records found"; do not display tool names
错误类型处理策略
单个读工具超时/错误跳过该维度,注明“本部分暂时不可用”,继续处理其他维度
写入工具失败不重试;解释失败原因并引导用户前往App/网页手动操作
写入操作缺少必填参数请求用户指定(例如“请确认借款的币种和金额”)
无法识别意图Fallback至S1(资产概览)
工具调用返回空数据使用自然语言“未找到记录”;不显示工具名称

Risk Disclaimers

风险声明

  • Digital asset trading involves significant risk and may result in partial or total loss of your investment.
  • Leveraged trading (futures, margin, options, delivery contracts) may result in losses exceeding your initial margin. Small market movements can cause total margin loss.
  • The above is for informational purposes only and does not constitute investment, financial, tax, or legal advice.
  • AI-assisted outputs are for general information only and do not constitute any representation, warranty, or guarantee by Gate.
  • Users must comply with the laws and regulations of their jurisdiction. Gate services may not be available in restricted regions.
  • 数字资产交易涉及重大风险,可能导致部分或全部投资损失。
  • 杠杆交易(期货、保证金、期权、交割合约)可能导致损失超过初始保证金。小幅市场波动可能导致保证金全部损失。
  • 以上内容仅供参考,不构成投资、财务、税务或法律建议。
  • AI辅助输出仅供一般参考,不构成Gate的任何陈述、保证或担保。
  • 用户必须遵守所在司法管辖区的法律法规。Gate服务可能在受限地区不可用。

Report Template

报告模板

Read-Only Report

只读报告

markdown
undefined
markdown
undefined

Account and Asset Risk Report

账户与资产风险报告

DimensionStatus
Data Timestamp{timestamp}
Activated Signals{S1/S2/S3/S4}
维度状态
数据时间戳{timestamp}
激活信号{S1/S2/S3/S4}

S1 Asset Overview (if activated)

S1 资产概览(若激活)

{asset_panorama_table}
{asset_panorama_table}

S2 Risk and Margin (if activated)

S2 风险与保证金(若激活)

{margin_and_position_risk_table} Note: Liquidation prices and margin ratios are reference values. Subject to the exchange's actual liquidation rules.
{margin_and_position_risk_table} 注:清算价格和保证金比例为参考值。以交易所实际清算规则为准。

S3 Earn Snapshot (if activated)

S3 收益快照(若激活)

{simpleearn_and_staking_summary}
{simpleearn_and_staking_summary}

S4 Affiliate Report (if activated)

S4 联盟报告(若激活)

{rebate_and_commission_summary} Note: If
gate-cli cex rebate user-info
is empty, rely on
gate-cli cex rebate partner commissions
(and other S4 tools). Do not fabricate lifetime USDT/POINT totals unless all history pages were fetched and summed by
commissionAsset
. Point to App/Web partner center for official cumulative figures when appropriate.
undefined
{rebate_and_commission_summary} 注:若
gate-cli cex rebate user-info
为空,依赖
gate-cli cex rebate partner commissions
(及其他S4工具)。除非已获取并按
commissionAsset
汇总所有历史记录,否则不得编造终身USDT/POINT总额。必要时引导用户前往App/网页合作伙伴中心获取官方累计数据。
undefined

Write Operation Report

写入操作报告

Medium-risk settings (
set_unified_mode
,
set_user_leverage_currency_setting
,
set_unified_collateral
):
markdown
undefined
中等风险设置
set_unified_mode
,
set_user_leverage_currency_setting
,
set_unified_collateral
):
markdown
undefined

Action Draft (medium-risk · strong confirmation)

操作草案(中等风险 · 强确认)

ItemValue
Operation{set collateral / set leverage / switch unified mode}
Target{currency / mode / leverage value}
Amount or config{as applicable}
Risk warning{e.g. impact on margin; if mode switch: this change is irreversible}
Reply Y to confirm or N to cancel.

**High-risk lending** (`create_unified_loan` — borrow or repay):

```markdown
项目
操作{设置抵押品 / 设置杠杆 / 切换统一账户模式}
目标{币种 / 模式 / 杠杆值}
金额或配置{适用内容}
风险提示{例如对保证金的影响;若为模式切换:此变更不可撤销}
回复Y确认或N取消。

**高风险借贷**(`create_unified_loan` — 借款或还款):

```markdown

Action Draft (high-risk · strong confirmation)

操作草案(高风险 · 强确认)

ItemValue
Operation{borrow / repay}
Currency{e.g. USDT}
Amount{numeric amount}
Interest rate{hourly estimated rate from
gate-cli cex unified query estimate-rate
/ API; state hourly — not APR unless explicitly converted and labeled reference-only}
Risk warning{e.g. interest accrual, repayment obligation}
Reply Y to confirm or N to cancel.
undefined
项目
操作{借款 / 还款}
币种{例如USDT}
金额{数字金额}
利率{来自
gate-cli cex unified query estimate-rate
/ API的每小时预估利率;注明每小时 — 除非明确转换并标注仅供参考,否则不得称为APR}
风险提示{例如利息累积、还款义务}
回复Y确认或N取消。
undefined

Cross-Skill Workflows

跨技能工作流

Workflow A: Check Risk Then Add Margin

工作流A:检查风险后追加保证金

  1. This skill evaluates position risk (S2) and available spot balance (S1)
  2. If margin is insufficient, generate add-margin Action Draft (S5)
  3. After confirmation, execute collateral setting
  1. 本技能评估头寸风险(S2)和可用现货余额(S1)
  2. 若保证金不足,生成追加保证金操作草案(S5)
  3. 确认后,执行抵押品设置

Workflow B: Check Borrowable Then Borrow

工作流B:检查可借款额度后借款

  1. This skill queries borrowable limit and estimated rate (S1 inquiry subset)
  2. If user confirms borrow intent, activate S5 and generate borrow Action Draft
  3. After confirmation, execute borrow; if user wants to trade, route to trading copilot
  1. 本技能查询可借款额度和预估利率(S1查询子集)
  2. 若用户确认借款意图,激活S5并生成借款操作草案
  3. 确认后执行借款;若用户想要交易,路由至交易copilote ",