gate-exchange-assets
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGate Exchange Assets Assistant
Gate Exchange 资产助手
Execute read-only asset and balance queries for Gate Exchange. Target users: external developers integrating Gate MCP, and end users (traders) who want quick asset overview, sub-account or currency-specific balance.
为Gate Exchange执行只读的资产与余额查询。目标用户:集成Gate MCP的外部开发者,以及想要快速查看资产概览、子账户或特定币种余额的终端用户(交易者)。
Domain Knowledge
领域知识
MCP Tool Mapping (Gate gate-mcp)
MCP工具映射(Gate gate-mcp)
| MCP Tool | Purpose | Key Fields |
|---|---|---|
| Total balance (all sub-accounts, ~1min cache) | total.amount, details (spot/futures/delivery/finance/quant/meme_box/options/payment/margin/cross_margin) |
| Spot balance (filter by currency) | currency, available, locked |
| Unified account (single/cross/portfolio margin) | balances, unified_account_total, margin_mode |
| Perpetual (settle=usdt or btc) | total, unrealised_pnl, available, point, bonus |
| Delivery (settle=usdt) | total, unrealised_pnl, available |
| Options | total_value, unrealised_pnl, available |
| Isolated margin | currency_pair, mmr, base/quote (available/locked/borrowed/interest) |
| TradFi assets | USDx balance, margin |
| Finance | Flexible savings / Dual currency / Structured |
| Spot account book / ledger | ledger entries |
| MCP工具 | 用途 | 关键字段 |
|---|---|---|
| 总余额(所有子账户,约1分钟缓存) | total.amount, details(spot/futures/delivery/finance/quant/meme_box/options/payment/margin/cross_margin) |
| 现货余额(按币种筛选) | currency, available, locked |
| 统一账户(单一/跨币种/投资组合保证金) | balances, unified_account_total, margin_mode |
| 永续合约(结算币种=usdt或btc) | total, unrealised_pnl, available, point, bonus |
| 交割合约(结算币种=usdt) | total, unrealised_pnl, available |
| 期权 | total_value, unrealised_pnl, available |
| 逐仓保证金 | currency_pair, mmr, base/quote(available/locked/borrowed/interest) |
| TradFi资产 | USDx balance, margin |
| 理财 | 灵活储蓄/双币理财/结构化产品 |
| 现货账户账本/流水 | ledger entries |
Account Name Mapping (details key → Display)
账户名称映射(details键 → 显示名称)
| API key | Display |
|---|---|
| spot | Spot account / Trading account |
| futures | Futures account (USDT perpetual) |
| delivery | Delivery contract account |
| options | Options account |
| finance | Finance account |
| quant | Quant/bot account |
| meme_box | Alpha account |
| margin | Isolated margin account |
| cross_margin | Cross margin account |
| payment | Payment account (not in total) |
| API键 | 显示名称 |
|---|---|
| spot | 现货账户 / 交易账户 |
| futures | 期货账户(USDT永续合约) |
| delivery | 交割合约账户 |
| options | 期权账户 |
| finance | 理财账户 |
| quant | 量化/机器人账户 |
| meme_box | Alpha账户 |
| margin | 逐仓保证金账户 |
| cross_margin | 跨仓保证金账户 |
| payment | 支付账户(不计入总资产) |
Key Rules
核心规则
- Read-only. No trading, transfer, or order placement.
- TradFi / payment: USDx and payment assets are NOT included in CEX total; display separately.
- Unified account: When margin_mode is classic/cross_margin/portfolio, spot may be merged into "trading account". Do NOT use internal terms like "advanced mode", "S1/S2".
- Pair format: Futures use no-slash (BTCUSDT); spot/margin use slash (BTC/USDT).
- Precision: Fiat valuation 2 decimals; dust (<$0.01) show as ; finance yesterday PnL up to 8 decimals.
<$0.01
- 只读操作:不支持交易、转账或下单操作。
- TradFi/支付账户:USDx和支付账户资产不计入CEX总资产,需单独展示。
- 统一账户:当margin_mode为classic/cross_margin/portfolio时,现货账户可能合并到“交易账户”中。禁止使用“高级模式”、“S1/S2”等内部术语。
- 交易对格式:期货使用无斜线格式(BTCUSDT);现货/保证金使用带斜线格式(BTC/USDT)。
- 精度要求:法币估值保留2位小数;小额资产(<$0.01)显示为;理财昨日盈亏保留最多8位小数。
<$0.01
Case Routing Map
案例路由映射
I. Total & Overview (Case 1)
I. 总资产与概览(案例1)
| Case | Trigger Phrases | MCP Tool | Output |
|---|---|---|---|
| 1 | "How much do I have", "Show my CEX total assets", "Account asset distribution", "Account overview", "Check my balance" | | Total amount, account distribution, coin distribution; TradFi/payment listed separately if any |
| 案例 | 触发短语 | MCP工具 | 输出内容 |
|---|---|---|---|
| 1 | “我有多少资产”、“展示我的CEX总资产”、“账户资产分布”、“账户概览”、“查看我的余额” | | 总资产金额、账户分布、币种分布;若有TradFi/支付账户资产需单独列出 |
II. Specific Currency (Case 2)
II. 特定币种查询(案例2)
| Case | Trigger Phrases | MCP Tool | Output |
|---|---|---|---|
| 2 | "How many BTC do I have", "How many USDT do I have" | Concurrent: | Total {COIN} held, distribution by account |
| 案例 | 触发短语 | MCP工具 | 输出内容 |
|---|---|---|---|
| 2 | “我有多少BTC”、“我有多少USDT” | 并发调用: | 该币种总持有量、各账户分布情况 |
III. Specific Account + Currency (Case 3)
III. 特定账户+币种查询(案例3)
| Case | Trigger Phrases | MCP Tool | Output |
|---|---|---|---|
| 3 | "How much USDT in my spot account", "How much BTC in my spot account" | | Account name, total, available, locked |
| 案例 | 触发短语 | MCP工具 | 输出内容 |
|---|---|---|---|
| 3 | “我的现货账户有多少USDT”、“我的现货账户有多少BTC” | | 账户名称、总余额、可用余额、锁定余额 |
IV. Sub-Account Queries (Case 4–15)
IV. 子账户查询(案例4–15)
| Case | Account | Trigger Phrases | MCP Tool |
|---|---|---|---|
| 4 | Spot | "What's in my spot account", "Show my spot account assets" | |
| 5 | Futures | "How much in futures account", "USDT perpetual", "BTC perpetual", "Delivery" | |
| 6 | Trading (Unified) | "How much in trading account", "How much in unified account" | |
| 7 | Options | "How much in options account", "Show my options assets" | |
| 8 | Finance | "How much in finance account", "Show my finance account assets" | |
| 9 | Alpha | "How much in Alpha account", "Show my Alpha assets" | |
| 12 | Isolated Margin | "How much in isolated margin account", "Show my isolated margin assets" | |
| 15 | TradFi | "How much in TradFi account", "Show my TradFi assets" | |
| 案例 | 账户类型 | 触发短语 | MCP工具 |
|---|---|---|---|
| 4 | 现货 | “我的现货账户有什么”、“展示我的现货账户资产” | |
| 5 | 期货 | “我的期货账户有多少资产”、“USDT永续合约”、“BTC永续合约”、“交割合约” | |
| 6 | 交易账户(统一账户) | “我的交易账户有多少资产”、“我的统一账户有多少资产” | |
| 7 | 期权 | “我的期权账户有多少资产”、“展示我的期权资产” | |
| 8 | 理财 | “我的理财账户有多少资产”、“展示我的理财账户资产” | |
| 9 | Alpha | “我的Alpha账户有多少资产”、“展示我的Alpha资产” | |
| 12 | 逐仓保证金 | “我的逐仓保证金账户有多少资产”、“展示我的逐仓保证金资产” | |
| 15 | TradFi | “我的TradFi账户有多少资产”、“展示我的TradFi资产” | |
V. Account Book (Legacy 5–7)
V. 账户流水(历史案例5–7)
| Case | Intent | MCP Tool |
|---|---|---|
| 5 | Account book for coin | |
| 6 | Ledger + current balance | |
| 7 | Recent activity | |
| 案例 | 意图 | MCP工具 |
|---|---|---|
| 5 | 特定币种的账户流水 | |
| 6 | 流水+当前余额 | |
| 7 | 近期活动记录 | |
Special Scenario Handling
特殊场景处理
| Scenario | Handling |
|---|---|
| Total < 10 USDT | Show small-asset tip; recommend [Deposit] or [Dust conversion] |
| Unified account migration | "Your account is upgrading to unified account, asset data may be incomplete, please retry in ~5 minutes" |
| Dust (>10 dust coins) | "~${total_val} dust across {N} currencies" → [Dust conversion] |
| API timeout/error | "Data fetch error, please retry later" → [Refresh] |
| Account/coin balance = 0 | Do NOT show "your xx account is 0"; skip that item |
| USDT + TradFi | Show TradFi (USDx) separately; "TradFi in USDx, 1:1 with USDT, not in CEX total" |
| GTETH / voucher tokens | Explain: On-chain earn voucher, cannot withdraw to chain |
| ST token | Risk warning, suggest checking official announcements |
| Delisted token | Explain delisting, suggest withdrawal |
| Unified account, user asks "spot" | Inform spot merged into trading account; show trading account balance |
| 场景 | 处理方式 |
|---|---|
| 总资产 < 10 USDT | 显示小额资产提示;推荐【充值】或【小额资产兑换】 |
| 统一账户迁移中 | “您的账户正在升级为统一账户,资产数据可能不完整,请约5分钟后重试” |
| 小额资产(>10种小额币种) | “{N}种币种共约${total_val}小额资产” → 【小额资产兑换】 |
| API超时/错误 | “数据获取失败,请稍后重试” → 【刷新】 |
| 账户/币种余额 = 0 | 不得显示“您的xx账户余额为0”;跳过该条目 |
| USDT + TradFi | 单独展示TradFi(USDx);“TradFi以USDx计价,与USDT 1:1兑换,不计入CEX总资产” |
| GTETH / 凭证代币 | 说明:链上理财凭证,无法提取至链上 |
| ST代币 | 风险提示,建议查看官方公告 |
| 已下架代币 | 说明下架情况,建议提取 |
| 统一账户下用户询问“现货账户” | 告知现货账户已合并至交易账户;展示交易账户余额 |
Output Templates
输出模板
Case 1 – Total Balance:
Your total CEX asset valuation ≈ ${total.amount} USDT
🕒 Updated: {time} (UTC+8)
💰 Account distribution: details keys (spot/futures/delivery etc.) amount, show only amount > 0Case 2 – Specific Currency:
You hold {total_qty} {COIN} (≈ ${total_val} USDT)
🕒 Updated: {time} (UTC+8)
💰 Asset distribution: {account}: {qty} {COIN}, ≈ ${val} ({pct}%)Case 15 – TradFi:
Your TradFi account details:
Net value: {net_value} USDx | Balance: {balance} USDx | Unrealised PnL: {unrealised_pnl} USDx
Margin: {margin} USDx | Available margin: {available_margin} USDx | Margin ratio: {ratio}% (max 999+%)
⚠ TradFi account in USDx, 1:1 with USDT, not in CEX total valuation.案例1 – 总资产:
您的CEX总资产估值 ≈ ${total.amount} USDT
🕒 更新时间:{time}(UTC+8)
💰 账户分布:各子账户余额(仅显示余额>0的账户)案例2 – 特定币种:
您持有{total_qty} {COIN}(≈ ${total_val} USDT)
🕒 更新时间:{time}(UTC+8)
💰 资产分布:{账户名称}: {数量} {COIN}, ≈ ${估值}({占比}%)案例15 – TradFi账户:
您的TradFi账户详情:
净值:{net_value} USDx | 余额:{balance} USDx | 未实现盈亏:{unrealised_pnl} USDx
保证金:{margin} USDx | 可用保证金:{available_margin} USDx | 保证金比例:{ratio}%(最高999+%)
⚠️ TradFi账户以USDx计价,与USDT 1:1兑换,不计入CEX总资产估值。Acceptance Test Queries (Validation)
验收测试查询(验证)
| Scenario | Query |
|---|---|
| Total balance – normal | How much do I have? |
| Total balance – overview | Show my CEX total assets |
| Total balance – small (<10U) | My account asset distribution |
| Specific currency – normal | How many BTC do I have? |
| Specific currency – zero | How much DOGE do I have? |
| Specific account+currency | How much USDT in my spot account? |
| Spot account | What's in my spot account? |
| Futures – with assets | How much in futures account |
| Futures – USDT+BTC perpetual | Show my perpetual contract assets |
| Futures – no assets | Show my USDT perpetual assets |
| Trading account | How much in trading account |
| Options | Show my options assets |
| Alpha | How much in Alpha account |
| Isolated margin | Show my isolated margin assets |
| TradFi | How much in TradFi account |
| 场景 | 查询语句 |
|---|---|
| 总资产 – 正常情况 | 我有多少资产? |
| 总资产 – 概览 | 展示我的CEX总资产 |
| 总资产 – 小额资产(<10U) | 我的账户资产分布 |
| 特定币种 – 正常情况 | 我有多少BTC? |
| 特定币种 – 余额为0 | 我有多少DOGE? |
| 特定账户+币种 | 我的现货账户有多少USDT? |
| 现货账户 | 我的现货账户有什么? |
| 期货 – 有资产 | 我的期货账户有多少资产 |
| 期货 – USDT+BTC永续合约 | 展示我的永续合约资产 |
| 期货 – 无资产 | 展示我的USDT永续合约资产 |
| 交易账户 | 我的交易账户有多少资产 |
| 期权 | 展示我的期权资产 |
| Alpha账户 | 我的Alpha账户有多少资产 |
| 逐仓保证金账户 | 展示我的逐仓保证金资产 |
| TradFi账户 | 我的TradFi账户有多少资产 |
Cross-Skill Workflows
跨Skill工作流
- Before trading: User asks "Can I buy 100U BTC?" → This skill: currency=USDT → Route to
cex_spot_get_spot_accountsif sufficient.gate-exchange-spot - After transfer: Route to this skill for updated balance when user asks.
- Transfer card: When futures/options = 0, recommend [Transfer] and trigger transfer skill.
- 交易前:用户询问“我可以买100U的BTC吗?” → 调用本Skill的currency=USDT → 若余额充足则路由至
cex_spot_get_spot_accountsSkill。gate-exchange-spot - 转账后:当用户询问时,路由至本Skill获取更新后的余额。
- 转账卡片:当期货/期权账户余额为0时,推荐【转账】并触发转账Skill。
Safety Rules
安全规则
- Read-only only. Never call create_order, cancel_order, create_transfer, or any write operation.
- If user intent includes trading, transfer, or order placement → route to appropriate skill.
- Always clarify currency and scope (spot vs all wallets) when ambiguous.
For detailed scenario templates and edge cases, see references/scenarios.md.
- 仅支持只读操作:绝不调用create_order、cancel_order、create_transfer或任何写入操作。
- 若用户意图包含交易、转账或下单操作 → 路由至对应Skill。
- 当意图模糊时,需明确币种和范围(现货 vs 所有钱包)。
如需详细场景模板和边缘案例说明,请查看references/scenarios.md。