gate-exchange-assets

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gate 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 ToolPurposeKey Fields
cex_wallet_get_total_balance
Total balance (all sub-accounts, ~1min cache)total.amount, details (spot/futures/delivery/finance/quant/meme_box/options/payment/margin/cross_margin)
cex_spot_get_spot_accounts
Spot balance (filter by currency)currency, available, locked
cex_unified_get_unified_accounts
Unified account (single/cross/portfolio margin)balances, unified_account_total, margin_mode
cex_fx_get_fx_accounts
Perpetual (settle=usdt or btc)total, unrealised_pnl, available, point, bonus
cex_delivery_list_delivery_accounts
Delivery (settle=usdt)total, unrealised_pnl, available
cex_options_list_options_account
Optionstotal_value, unrealised_pnl, available
cex_margin_list_margin_accounts
Isolated margincurrency_pair, mmr, base/quote (available/locked/borrowed/interest)
cex_tradfi_query_user_assets
TradFi assetsUSDx balance, margin
cex_earn_list_dual_balance
,
cex_earn_list_dual_orders
,
cex_earn_list_structured_orders
FinanceFlexible savings / Dual currency / Structured
cex_spot_list_spot_account_book
Spot account book / ledgerledger entries
MCP工具用途关键字段
cex_wallet_get_total_balance
总余额(所有子账户,约1分钟缓存)total.amount, details(spot/futures/delivery/finance/quant/meme_box/options/payment/margin/cross_margin)
cex_spot_get_spot_accounts
现货余额(按币种筛选)currency, available, locked
cex_unified_get_unified_accounts
统一账户(单一/跨币种/投资组合保证金)balances, unified_account_total, margin_mode
cex_fx_get_fx_accounts
永续合约(结算币种=usdt或btc)total, unrealised_pnl, available, point, bonus
cex_delivery_list_delivery_accounts
交割合约(结算币种=usdt)total, unrealised_pnl, available
cex_options_list_options_account
期权total_value, unrealised_pnl, available
cex_margin_list_margin_accounts
逐仓保证金currency_pair, mmr, base/quote(available/locked/borrowed/interest)
cex_tradfi_query_user_assets
TradFi资产USDx balance, margin
cex_earn_list_dual_balance
,
cex_earn_list_dual_orders
,
cex_earn_list_structured_orders
理财灵活储蓄/双币理财/结构化产品
cex_spot_list_spot_account_book
现货账户账本/流水ledger entries

Account Name Mapping (details key → Display)

账户名称映射(details键 → 显示名称)

API keyDisplay
spotSpot account / Trading account
futuresFutures account (USDT perpetual)
deliveryDelivery contract account
optionsOptions account
financeFinance account
quantQuant/bot account
meme_boxAlpha account
marginIsolated margin account
cross_marginCross margin account
paymentPayment account (not in total)
API键显示名称
spot现货账户 / 交易账户
futures期货账户(USDT永续合约)
delivery交割合约账户
options期权账户
finance理财账户
quant量化/机器人账户
meme_boxAlpha账户
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
    <$0.01
    ; finance yesterday PnL up to 8 decimals.
  • 只读操作:不支持交易、转账或下单操作。
  • TradFi/支付账户:USDx和支付账户资产不计入CEX总资产,需单独展示。
  • 统一账户:当margin_mode为classic/cross_margin/portfolio时,现货账户可能合并到“交易账户”中。禁止使用“高级模式”、“S1/S2”等内部术语。
  • 交易对格式:期货使用无斜线格式(BTCUSDT);现货/保证金使用带斜线格式(BTC/USDT)。
  • 精度要求:法币估值保留2位小数;小额资产(<$0.01)显示为
    <$0.01
    ;理财昨日盈亏保留最多8位小数。

Case Routing Map

案例路由映射

I. Total & Overview (Case 1)

I. 总资产与概览(案例1)

CaseTrigger PhrasesMCP ToolOutput
1"How much do I have", "Show my CEX total assets", "Account asset distribution", "Account overview", "Check my balance"
cex_wallet_get_total_balance
currency=USDT
Total amount, account distribution, coin distribution; TradFi/payment listed separately if any
案例触发短语MCP工具输出内容
1“我有多少资产”、“展示我的CEX总资产”、“账户资产分布”、“账户概览”、“查看我的余额”
cex_wallet_get_total_balance
currency=USDT
总资产金额、账户分布、币种分布;若有TradFi/支付账户资产需单独列出

II. Specific Currency (Case 2)

II. 特定币种查询(案例2)

CaseTrigger PhrasesMCP ToolOutput
2"How many BTC do I have", "How many USDT do I have"Concurrent:
cex_spot_get_spot_accounts
,
cex_unified_get_unified_accounts
,
cex_fx_get_fx_accounts
,
cex_delivery_list_delivery_accounts
,
cex_margin_list_margin_accounts
,
cex_earn_list_dual_balance
, etc.
Total {COIN} held, distribution by account
案例触发短语MCP工具输出内容
2“我有多少BTC”、“我有多少USDT”并发调用:
cex_spot_get_spot_accounts
,
cex_unified_get_unified_accounts
,
cex_fx_get_fx_accounts
,
cex_delivery_list_delivery_accounts
,
cex_margin_list_margin_accounts
,
cex_earn_list_dual_balance
该币种总持有量、各账户分布情况

III. Specific Account + Currency (Case 3)

III. 特定账户+币种查询(案例3)

CaseTrigger PhrasesMCP ToolOutput
3"How much USDT in my spot account", "How much BTC in my spot account"
cex_spot_get_spot_accounts
currency={COIN} or
cex_unified_get_unified_accounts
currency={COIN}
Account name, total, available, locked
案例触发短语MCP工具输出内容
3“我的现货账户有多少USDT”、“我的现货账户有多少BTC”
cex_spot_get_spot_accounts
currency={COIN} 或
cex_unified_get_unified_accounts
currency={COIN}
账户名称、总余额、可用余额、锁定余额

IV. Sub-Account Queries (Case 4–15)

IV. 子账户查询(案例4–15)

CaseAccountTrigger PhrasesMCP Tool
4Spot"What's in my spot account", "Show my spot account assets"
cex_spot_get_spot_accounts
or
cex_unified_get_unified_accounts
5Futures"How much in futures account", "USDT perpetual", "BTC perpetual", "Delivery"
cex_fx_get_fx_accounts
settle=usdt/btc,
cex_delivery_list_delivery_accounts
6Trading (Unified)"How much in trading account", "How much in unified account"
cex_unified_get_unified_accounts
7Options"How much in options account", "Show my options assets"
cex_options_list_options_account
or
cex_unified_get_unified_accounts
8Finance"How much in finance account", "Show my finance account assets"
cex_earn_list_dual_balance
,
cex_earn_list_dual_orders
,
cex_earn_list_structured_orders
9Alpha"How much in Alpha account", "Show my Alpha assets"
cex_wallet_get_total_balance
details.meme_box
12Isolated Margin"How much in isolated margin account", "Show my isolated margin assets"
cex_margin_list_margin_accounts
15TradFi"How much in TradFi account", "Show my TradFi assets"
cex_tradfi_query_user_assets
案例账户类型触发短语MCP工具
4现货“我的现货账户有什么”、“展示我的现货账户资产”
cex_spot_get_spot_accounts
cex_unified_get_unified_accounts
5期货“我的期货账户有多少资产”、“USDT永续合约”、“BTC永续合约”、“交割合约”
cex_fx_get_fx_accounts
settle=usdt/btc,
cex_delivery_list_delivery_accounts
6交易账户(统一账户)“我的交易账户有多少资产”、“我的统一账户有多少资产”
cex_unified_get_unified_accounts
7期权“我的期权账户有多少资产”、“展示我的期权资产”
cex_options_list_options_account
cex_unified_get_unified_accounts
8理财“我的理财账户有多少资产”、“展示我的理财账户资产”
cex_earn_list_dual_balance
,
cex_earn_list_dual_orders
,
cex_earn_list_structured_orders
9Alpha“我的Alpha账户有多少资产”、“展示我的Alpha资产”
cex_wallet_get_total_balance
details.meme_box
12逐仓保证金“我的逐仓保证金账户有多少资产”、“展示我的逐仓保证金资产”
cex_margin_list_margin_accounts
15TradFi“我的TradFi账户有多少资产”、“展示我的TradFi资产”
cex_tradfi_query_user_assets

V. Account Book (Legacy 5–7)

V. 账户流水(历史案例5–7)

CaseIntentMCP Tool
5Account book for coin
cex_spot_list_spot_account_book
6Ledger + current balance
cex_spot_list_spot_account_book
cex_spot_get_spot_accounts
7Recent activity
cex_spot_list_spot_account_book
案例意图MCP工具
5特定币种的账户流水
cex_spot_list_spot_account_book
6流水+当前余额
cex_spot_list_spot_account_book
cex_spot_get_spot_accounts
7近期活动记录
cex_spot_list_spot_account_book

Special Scenario Handling

特殊场景处理

ScenarioHandling
Total < 10 USDTShow 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 = 0Do NOT show "your xx account is 0"; skip that item
USDT + TradFiShow TradFi (USDx) separately; "TradFi in USDx, 1:1 with USDT, not in CEX total"
GTETH / voucher tokensExplain: On-chain earn voucher, cannot withdraw to chain
ST tokenRisk warning, suggest checking official announcements
Delisted tokenExplain 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 > 0
Case 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)

验收测试查询(验证)

ScenarioQuery
Total balance – normalHow much do I have?
Total balance – overviewShow my CEX total assets
Total balance – small (<10U)My account asset distribution
Specific currency – normalHow many BTC do I have?
Specific currency – zeroHow much DOGE do I have?
Specific account+currencyHow much USDT in my spot account?
Spot accountWhat's in my spot account?
Futures – with assetsHow much in futures account
Futures – USDT+BTC perpetualShow my perpetual contract assets
Futures – no assetsShow my USDT perpetual assets
Trading accountHow much in trading account
OptionsShow my options assets
AlphaHow much in Alpha account
Isolated marginShow my isolated margin assets
TradFiHow 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:
    cex_spot_get_spot_accounts
    currency=USDT → Route to
    gate-exchange-spot
    if sufficient.
  • 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的
    cex_spot_get_spot_accounts
    currency=USDT → 若余额充足则路由至
    gate-exchange-spot
    Skill。
  • 转账后:当用户询问时,路由至本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