← 返回 Skills 市场
gate-exchange

Gate Exchange Assets

作者 Gate · GitHub ↗ · v1.0.5 · MIT-0
cross-platform ✓ 安全检测通过
377
总下载
0
收藏
0
当前安装
6
版本数
在 OpenClaw 中安装
/install gate-exchange-assets
功能描述
Gate multi-account asset and balance query skill. Use when the user asks to check total assets, account balance, or specific coin holdings across all account...
使用说明 (SKILL.md)

Gate Exchange Assets Assistant

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 ./references/gate-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.

MCP Dependencies

Required MCP Servers

MCP Server Status
Gate (main) ✅ Required

MCP Tools Used

Query Operations (Read-only)

  • cex_dc_list_dc_accounts
  • cex_earn_list_dual_balance
  • cex_earn_list_dual_orders
  • cex_earn_list_structured_orders
  • cex_fx_get_fx_accounts
  • cex_margin_list_margin_accounts
  • cex_options_list_options_account
  • cex_spot_get_spot_accounts
  • cex_spot_list_spot_account_book
  • cex_tradfi_query_user_assets
  • cex_unified_get_unified_accounts
  • cex_wallet_get_total_balance

Authentication

  • Credentials Source: Local Gate MCP deployment (GATE_API_KEY, GATE_API_SECRET)
  • API Key Required: Yes
  • Permissions: Delivery:Read, Earn:Read, Fx:Read, Margin:Read, Options:Read, Spot:Read, Tradfi:Read, Unified:Read, Wallet:Read
  • Never ask the user to paste secrets into chat; rely on the configured MCP session only.
  • API Key Provisioning Reference: https://www.gate.com/myaccount/profile/api-key/manage (create or rotate keys outside the chat when the local MCP setup requires them).

Installation Check

  • Required: Gate (main)
  • Install: Use the local Gate MCP installation flow for the current host IDE before continuing.
  • Continue only after the Gate MCP session is configured with the credentials listed above; do not switch to browser auth or ask the user to paste secrets into chat.

MCP Mode

Read and strictly follow references/mcp.md, then execute this skill's assets-query workflow.

  • SKILL.md keeps intent routing and rendering rules.
  • references/mcp.md is the authoritative MCP execution layer for multi-account data collection, normalization, and degraded output handling.

Domain Knowledge

MCP Tool Mapping (Gate gate-mcp)

MCP Tool Purpose Key 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_dc_list_dc_accounts Delivery (settle=usdt) total, unrealised_pnl, available
cex_options_list_options_account Options total_value, unrealised_pnl, available
cex_margin_list_margin_accounts Isolated margin currency_pair, mmr, base/quote (available/locked/borrowed/interest)
cex_tradfi_query_user_assets TradFi assets USDx balance, margin
cex_earn_list_dual_balance, cex_earn_list_dual_orders, cex_earn_list_structured_orders Finance Flexible savings / Dual currency / Structured
cex_spot_list_spot_account_book Spot account book / ledger ledger entries

Account Name Mapping (details key → Display)

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)

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 (\x3C$0.01) show as \x3C$0.01; finance yesterday PnL up to 8 decimals.

Case Routing Map

I. Total & Overview (Case 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" cex_wallet_get_total_balance currency=USDT Total amount, account distribution, coin distribution; TradFi/payment listed separately if any

II. Specific Currency (Case 2)

Case Trigger Phrases MCP Tool Output
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_dc_list_dc_accounts, cex_margin_list_margin_accounts, cex_earn_list_dual_balance, etc. Total {COIN} held, distribution by account

III. Specific Account + Currency (Case 3)

Case Trigger Phrases MCP Tool Output
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

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

Case Account Trigger Phrases MCP Tool
4 Spot "What's in my spot account", "Show my spot account assets" cex_spot_get_spot_accounts or cex_unified_get_unified_accounts
5 Futures "How much in futures account", "USDT perpetual", "BTC perpetual", "Delivery" cex_fx_get_fx_accounts settle=usdt/btc, cex_dc_list_dc_accounts
6 Trading (Unified) "How much in trading account", "How much in unified account" cex_unified_get_unified_accounts
7 Options "How much in options account", "Show my options assets" cex_options_list_options_account or cex_unified_get_unified_accounts
8 Finance "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
9 Alpha "How much in Alpha account", "Show my Alpha assets" cex_wallet_get_total_balance details.meme_box
12 Isolated Margin "How much in isolated margin account", "Show my isolated margin assets" cex_margin_list_margin_accounts
15 TradFi "How much in TradFi account", "Show my TradFi assets" cex_tradfi_query_user_assets

V. Account Book (Legacy 5–7)

Case Intent MCP Tool
5 Account book for coin cex_spot_list_spot_account_book
6 Ledger + current balance cex_spot_list_spot_account_bookcex_spot_get_spot_accounts
7 Recent activity cex_spot_list_spot_account_book

Special Scenario Handling

Scenario Handling
Total \x3C 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

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.

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 (\x3C10U) 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

Cross-Skill Workflows

  • 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.

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.

安全使用建议
This skill appears coherent and read-only, but before installing: 1) Only provide Gate API credentials that have minimal read-only scopes; do not paste secrets into chat — provision them to the agent/MCP out-of-band. 2) Verify the local MCP deployment and host are trusted because the skill will use environment-stored keys at runtime. 3) Confirm the skill source (inspect the linked GitHub repo) if you need provenance assurance. 4) Consider creating a scoped, low-privilege API key to test functionality and rotate keys after use. 5) Be aware the agent can invoke skills when permitted — if you allow autonomous invocation, the skill could query balances automatically using the provided credentials.
功能分析
Type: OpenClaw Skill Name: gate-exchange-assets Version: 1.0.5 The gate-exchange-assets skill is a read-only utility designed to query account balances and asset distributions across various Gate.io services (Spot, Margin, Futures, etc.). The instructions in SKILL.md and references/gate-runtime-rules.md explicitly restrict the agent to read-only operations, forbidding any trading, transfers, or secret exfiltration. The skill uses standard MCP tools for data retrieval and follows the expected OpenClaw structure without any signs of malicious intent or obfuscation.
能力标签
cryptorequires-walletcan-make-purchases
能力评估
Purpose & Capability
Name/description, declared MCP tools, and required env vars (GATE_API_KEY, GATE_API_SECRET) all align with a multi-account, read-only Gate balance query. The listed permission scopes map to Gate read-only capabilities (Spot, Margin, Wallet, Earn, etc.) and are expected for the described aggregation.
Instruction Scope
SKILL.md limits actions to documented MCP read tools and explicitly forbids writes, asking users to rely on a configured local Gate MCP session and not to paste secrets into chat. This is appropriately scoped, but it does assume a trusted local MCP environment that has access to the provided API credentials (i.e., the skill will read those env vars at runtime).
Install Mechanism
Instruction-only skill with no install spec and no code files — lowest persistence/install risk. All runtime behavior is described in included docs.
Credentials
Only two environment variables (API key and secret) are required and declared; both are appropriate and necessary for Gate API reads. PrimaryEnv is correctly set to GATE_API_KEY. The permission scopes requested are read-only and justified.
Persistence & Privilege
always is false and there is no install or modifications to host configuration. The skill requires runtime access to environment credentials but does not request persistent system changes or cross-skill config writes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gate-exchange-assets
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gate-exchange-assets 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.5
- Runtime rules location updated: Now references `./references/gate-runtime-rules.md` (was `../gate-runtime-rules.md`). - Added `metadata` block for compatibility, including `openclaw` environment requirements and homepage link. - Removed unused files: `CHANGELOG.md`, `README.md`, and `references/scenarios.md`. - Added `references/gate-runtime-rules.md` to document runtime guidelines. - No changes to query logic or API surface.
v1.0.4
- Updated the runtime rules link to reference a local path (`../gate-runtime-rules.md`) instead of a GitHub URL. - Clarified the MCP installation check and host IDE instructions for credential/session setup. - Reworded instructions to explicitly disallow browser authentication or asking the user to paste secrets. - No logic, tool, or intent changes; documentation and installation flow clarification only.
v1.0.3
- Added explicit lists of required credentials, environment variables, and necessary permissions. - Clarified that secrets must never be requested in chat; asset queries rely on preconfigured local MCP session credentials. - Updated authentication instructions to reflect credential source and modernized the API key provisioning reference. - No functional changes to the skill logic or routing; documentation and compliance improvements only.
v1.0.2
- Added an authoritative execution/degradation guide at `references/mcp.md`; SKILL.md now refers to it as the MCP execution source. - Changed Delivery account tool from `cex_delivery_list_delivery_accounts` to `cex_dc_list_dc_accounts` throughout. - Clarified and shortened the skill description and trigger phrases for conciseness. - Updated references to the asset-query workflow: `SKILL.md` is now for intent/routing, while `references/mcp.md` handles data collection and normalization. - General documentation refinements and clearer execution rules; no functional changes to API interactions.
v1.0.1
- Enforced strict runtime and tool usage rules; only documented MCP tools are allowed. - Added explicit authentication and installation requirements for correct deployment. - Refined MCP tool descriptions and streamlined documentation for user clarity. - Updated trigger phrases, description, and scenarios to ensure complete asset coverage (TradFi, spot, futures, margin, options, finance, Alpha). - Improved formatting and domain knowledge presentation for easier integration and compliance.
v1.0.0
gate-exchange-assets 1.0.0 - Initial release: Gate Exchange asset and balance query assistant. - Supports read-only queries for total assets, account, sub-account, or specific coin balances. - Handles spot, futures, margin, options, finance, Alpha, and TradFi accounts. - Provides user-friendly output templates for summary and detail queries. - Includes logic for unified account handling, dust assets, delisted tokens, and error cases.
元数据
Slug gate-exchange-assets
版本 1.0.5
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 6
常见问题

Gate Exchange Assets 是什么?

Gate multi-account asset and balance query skill. Use when the user asks to check total assets, account balance, or specific coin holdings across all account... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 377 次。

如何安装 Gate Exchange Assets?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gate-exchange-assets」即可一键安装,无需额外配置。

Gate Exchange Assets 是免费的吗?

是的,Gate Exchange Assets 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Gate Exchange Assets 支持哪些平台?

Gate Exchange Assets 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Gate Exchange Assets?

由 Gate(@gate-exchange)开发并维护,当前版本 v1.0.5。

💬 留言讨论