← 返回 Skills 市场
gate-exchange

Gate Exchange Transfer

作者 Gate · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ✓ 安全检测通过
162
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install gate-exchange-transfer
功能描述
Gate Exchange same-UID internal transfer skill. Use when the user asks to move funds between their own Gate accounts. Triggers on 'transfer funds', 'move USD...
使用说明 (SKILL.md)

Gate Exchange Transfer (Internal Transfer)

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.

Execute same-UID internal transfers between Gate trading accounts: spot, isolated margin, perpetual, delivery, and options. Single execution endpoint: POST /wallet/transfers (MCP: cex_wallet_create_transfer).

Scope (Phase 1)

  • Supported: internal transfer only (same UID, between account types above).
  • Not supported: main-to-sub, sub-to-main, sub-to-sub.

MCP Dependencies

Required MCP Servers

MCP Server Status
Gate (main) ✅ Required

MCP Tools Used

Query Operations (Read-only)

  • cex_dc_list_dc_account_book
  • cex_fx_list_fx_account_book
  • cex_margin_list_margin_account_book
  • cex_options_list_options_account_book
  • cex_spot_list_spot_account_book

Execution Operations (Write)

  • cex_wallet_create_transfer

Authentication

  • Credentials Source: Local Gate MCP deployment (GATE_API_KEY, GATE_API_SECRET)
  • API Key Required: Yes
  • Permissions: Delivery:Read, Fx:Read, Margin:Read, Options:Read, Spot:Read, Wallet:Write
  • 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 transfer workflow.

  • SKILL.md keeps transfer intent routing and account-type mapping.
  • references/mcp.md is the authoritative MCP execution layer for transfer pre-check, confirmation gate, execution, and ledger verification.

Preconditions

Precondition If not met
User logged in Do not call API; prompt to log in (exception flow).
Account mode known Infer from context or assume classic: Spot ↔ USDT perpetual. For unified/trading account advanced mode: Trading account ↔ BTC perpetual.
Source balance verifiable Call balance API for from account before showing draft; if unavailable, prompt user to check on web.

The Four Elements

Every internal transfer is fully specified by four elements. The assistant must resolve or infer them before showing a Transfer Draft.

Element API param Required when Notes
From from Always spot | margin | futures | delivery | options
To to Always Same enum as from
Currency currency Always USDT, BTC, etc. (platform-supported). Missing → auto-complete by target (case2).
Amount amount Always String, > 0, up to 8 decimals. Missing → ask user (case8).

Conditional params

  • margin: currency_pair required (e.g. BTC_USDT) when from or to is margin.
  • futures / delivery: settle required (usdt | btc) when from or to is futures or delivery.

Public API (Phase 1)

Endpoint Method Meaning Rate limit
/wallet/transfers POST Same-UID internal transfer 80 req/10s

Tool Mapping

Group Tool (jsonrpc: call.method)
Main account internal transfer cex_wallet_create_transfer

Case Index

Case Scenario Action
case1 All four elements present Show Transfer Draft → confirm → call API → Transfer Result Report
case2 Currency missing Auto-complete currency by target account → same as case1
case3 Transfer completed (API success) Output Transfer Result Report + product suggestion
case4 Insufficient balance Pre-check fails; no API call; show shortfall and suggest deposit/adjust
case5 Missing from/to or ambiguous intent Show missing-info card; do not call API
case6 Account mode conflict (e.g. trading account → USDT perpetual not allowed) Explain and suggest alternative path
case7 Currency vs To mismatch (e.g. USDT to BTC perpetual) Auto-correct or prompt correction → then case1
case8 Amount missing Ask for amount; after user provides, proceed to case1/case2
case9 User cancels or declines after draft Acknowledge; do not call API
case10 Confirmation ambiguous or stale Re-present draft; ask for explicit "Confirm" / "Yes"; do not execute
case11 Rate limit / service error Do not retry blindly; prompt retry later or use web UI

Transfer Draft (Mandatory before execution)

Before calling cex_wallet_create_transfer, output a Transfer Draft and wait for explicit confirmation in the immediately following user turn.

Draft contents

  • from (account name)
  • to (account name)
  • currency
  • amount
  • If applicable: settle (for futures/delivery), currency_pair (for margin)

Confirmation rule

  • Treat confirmation as single-use. If user changes amount, currency, or direction, show a new draft and re-confirm.
  • If user does not clearly confirm (e.g. "Confirm", "Yes", "Proceed"), do not execute (case10).

Transfer Result Report (After successful API call)

  • Confirm success: e.g. "Transfer successful. {amount} {currency} has arrived in your {to account name}."
  • Optionally suggest next step by destination: Spot → spot trading; USDT perpetual → USDT-margined perpetual; etc.
  • Mention transfer history: e.g. transfer/historyV2 or equivalent MCP tool.

Case Logic and Output

case1: All four elements present

Trigger
"Transfer 100 USDT from my spot account to perpetual futures account" / "Transfer 1000 USDT from spot to USDT-margined futures" / "Transfer 0.5 BTC from coin-margined to spot"

Steps

  1. Resolve from, to, currency, amount; add settle or currency_pair if needed.
  2. Pre-check: fetch source balance; if balance \x3C amount → case4.
  3. Output Transfer Draft.
  4. Wait for explicit confirmation.
  5. Call cex_wallet_create_transfer.
  6. Output Transfer Result Report (case3).

Request mapping

Intent API parameter Values
Source account from spot | margin | futures | delivery | options
Target account to spot | margin | futures | delivery | options
Currency currency USDT, BTC, etc.
Amount amount String, > 0, up to 8 decimals
Margin pair currency_pair Required if from/to is margin, e.g. BTC_USDT
Settlement settle Required if from/to is futures or delivery: usdt | btc

case2: Currency missing, auto-complete

Trigger
"Transfer 100 to my USDT-margined account" / "Transfer 500 to futures" / "Transfer 1000 to perpetual"

Logic
Set currency by target account:

Target account Default currency
USDT perpetual (futures settle=usdt) USDT
BTC perpetual (futures settle=btc) BTC
TradFi USDT
Delivery USDT
Options USDT
Spot / margin Infer from context or ask

Steps
Same as case1 after currency is set.

Output (draft)
"Detected transfer of {amount} to {to account name}. Based on account type, default currency is {currency}. Please confirm."


case3: Transfer completed (API success)

Trigger
User confirmed; cex_wallet_create_transfer returned success.

Output

  • "Transfer successful. {amount} {currency} has arrived in your {to account name}."
  • Optional: product suggestion by destination (spot / USDT perpetual / BTC perpetual / delivery / margin / TradFi / options).
  • "Transfer history: transfer/historyV2" (or equivalent).

case4: Insufficient balance

Trigger
Pre-check: source available balance \x3C transfer amount.

Action
Do not call transfer API.

Output
"Your {from account name} has insufficient balance (available: {available} {currency}). Please adjust the amount or deposit first."


case5: Missing from/to or ambiguous intent

Trigger
"Contract is about to be liquidated, transfer some funds for margin" / "Top up my futures margin" / "How do I adjust account funds"

Logic

  • If missing ≥ 2 of from, to, currency, amount: show missing-info card and ask user to provide.
  • Defaults when only one side is clear:
    • Unified/trading account advanced mode: default from = Trading account, to = BTC perpetual.
    • Classic: default from = Spot, to = USDT perpetual.
  • Do not call API until four elements are clear.

Output
"I can help with margin top-up. Please specify: from account, to account, and currency (and amount if you know it)."


case6: Account mode conflict

Trigger
User in trading account advanced mode asks to transfer to USDT perpetual. In this mode, direct transfer to USDT perpetual may be disallowed (path not available).

Output
"You are in trading account mode; direct transfer to USDT perpetual is not available. You can transfer to BTC perpetual (coin-margined) instead, or adjust account mode on the web."


case7: Currency vs To account mismatch

Trigger
"Transfer some USDT to my BTC perpetual account"

Logic
BTC perpetual settles in BTC; USDT is inconsistent.

  • Option A: Correct to BTC amount (if user intent allows).
  • Option B: Explain that BTC perpetual uses BTC; suggest transferring BTC or using USDT perpetual for USDT.
  • If user confirms a corrected draft (e.g. spot → BTC perpetual with BTC), proceed as case1.

Output
"BTC perpetual uses BTC settlement. I've corrected the transfer to use BTC (or: please specify amount in BTC). Please confirm." Or: "For USDT, use USDT perpetual account instead."


case8: Amount missing

Trigger
"Transfer USDT from spot to futures" / "Move my USDT to perpetual" (no amount).

Action
Ask: "How much {currency} do you want to transfer from {from} to {to}?" After user provides amount, resolve currency if still missing (case2), then proceed to case1.


case9: User cancels or declines

Trigger
After Transfer Draft, user says "No" / "Cancel" / "Don't do it" / "Never mind".

Action
Do not call API. Acknowledge: "Transfer cancelled. No changes made."


case10: Confirmation ambiguous or stale

Trigger
After draft, user replies with something other than clear confirmation (e.g. new question, different amount, or vague "ok" in a long thread).

Action
Do not execute. Re-present the Transfer Draft and say: "To execute this transfer, please confirm explicitly (e.g. 'Confirm' or 'Yes')."


case11: Rate limit or service error

Trigger
API returns TOO_MANY_REQUESTS or server/network error.

Action
Do not retry automatically in the same turn.
Output
"Request failed (rate limit / service error). Please try again later or use the web app to transfer."


Exception Flow Summary

Exception Handling Block execution
Not logged in Prompt to log in Yes
Insufficient balance Show shortfall + suggest deposit/adjust (case4) Yes
Invalid account path (e.g. from/to not allowed) Guide user to correct (case5/case6) No, guide
User cancel / decline Acknowledge (case9) Yes
Confirmation missing/ambiguous Re-present draft, ask explicit confirm (case10) Yes
Rate limit / service error Retry later or use web (case11) Yes
Risk control / quota Show clear reason Yes

API Reference

Request body example

{
  "currency": "USDT",
  "from": "spot",
  "to": "futures",
  "amount": "100",
  "currency_pair": "",
  "settle": "usdt"
}

from / to → product name

API value Product name
spot Spot
margin Isolated margin
futures Perpetual (use settle)
delivery Delivery
options Options

settle (futures / delivery)

settle Account
usdt USDT perpetual
btc BTC perpetual

currency_pair (margin)

Required when from or to is margin; e.g. BTC_USDT.


Transfer History Query

After a transfer, user may ask for history. By account type:

Account Query tool (if MCP provides) Notes
Spot cex_spot_list_spot_account_book currency, time, limit
Perpetual cex_fx_list_fx_account_book settle, type=dnw
Delivery cex_dc_list_dc_account_book settle, type=dnw
Margin cex_margin_list_margin_account_book currency_pair, time, limit
Options cex_options_list_options_account_book per MCP docs

REST: Delivery GET /delivery/{settle}/account_book?type=dnw; Perpetual GET /futures/{settle}/account_book?type=dnw; Margin GET /margin/account_book.


Error Codes

Code Meaning
BALANCE_NOT_ENOUGH Insufficient balance; do not retry same amount
TOO_MANY_REQUESTS Rate limit; prompt retry later (case11)
QUOTA_NOT_ENOUGH Quota exceeded; show message

Execution Rules (Summary)

  1. Single endpoint: Internal transfer only via POST /wallet/transfers (cex_wallet_create_transfer). No main-sub in Phase 1.
  2. Always show Transfer Draft with from, to, currency, amount (and settle/currency_pair if needed).
  3. Require explicit confirmation in the next user turn; single-use; re-confirm if params change.
  4. Pre-check balance before calling API; on insufficient balance, follow case4 and do not call.
  5. Conditional params: currency_pair for margin; settle for futures/delivery.
  6. Missing currency: case2 default table. Missing amount: case8 ask.
  7. Account mode / currency mismatch: case6 and case7; resolve or correct before executing.
  8. On cancel or ambiguous confirm: case9/case10; do not execute.
安全使用建议
This skill appears coherent for performing same-UID internal transfers on Gate. Before installing/using it: (1) only supply API credentials to the local MCP/session (do not paste secrets into chat); (2) create API keys with the minimum necessary scopes (Wallet:Write and the read permissions listed) and rotate/revoke them if you stop using the skill; (3) verify every Transfer Draft and never confirm blindly; (4) confirm you trust the skill source/homepage before granting any keys to your environment.
功能分析
Type: OpenClaw Skill Name: gate-exchange-transfer Version: 1.0.3 The skill is a legitimate utility for performing internal transfers between different account types (spot, margin, futures, etc.) within a single Gate.io user account. It implements strong safety guardrails, including mandatory 'Transfer Drafts', explicit user confirmation requirements, and strict rules against requesting API secrets in chat or performing cross-UID transfers. The logic is transparently documented across SKILL.md, gate-runtime-rules.md, and mcp.md, with no evidence of malicious intent, data exfiltration, or unauthorized command execution.
能力标签
cryptorequires-wallet
能力评估
Purpose & Capability
The skill is an internal-transfer helper for Gate and explicitly requires Gate API key/secret and Wallet:Write plus read permissions across account types. These requirements match the stated capability (reading balances and initiating same-UID transfers).
Instruction Scope
SKILL.md confines runtime actions to MCP read tools and a single write tool (cex_wallet_create_transfer), mandates a transfer draft and explicit confirmation, and includes packaged runtime rules that forbid asking users to paste secrets or calling undocumented tools. The instructions do not request unrelated files or secrets.
Install Mechanism
This is instruction-only with no install spec or code to write to disk, minimizing install-time risk. All execution is expected through the local Gate MCP session and documented MCP tools.
Credentials
The skill requires GATE_API_KEY and GATE_API_SECRET (primaryEnv set to GATE_API_KEY) and Wallet:Write permission — this is necessary for transfers but is sensitive. The number and type of env vars are proportionate to the task, but users should ensure the key's scope is limited and trust the MCP environment.
Persistence & Privilege
always is false and the skill does not request persistent system modifications or config paths. Autonomous invocation is allowed (platform default) but not combined here with other red flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gate-exchange-transfer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gate-exchange-transfer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
- Updated shared runtime rule reference to a local file: `references/gate-runtime-rules.md`. - Added new reference file: `references/gate-runtime-rules.md`. - Removed outdated documentation and extraneous references: `README.md`, `CHANGELOG.md`, and `references/scenarios.md` deleted. - Updated installation guidance to align with local MCP installation flows per host IDE. - Minor metadata and format adjustments in `SKILL.md` for improved clarity and automation compatibility.
v1.0.2
- Added explicit documentation of required credentials (`gate_api_key`, `gate_api_secret`) and required environment variables. - Clarified that credentials must only be supplied via configured MCP session; never request secrets in chat. - Expanded authentication guidance: state credential source, permissions needed, and out-of-band API key creation link. - No logic or workflow changes—documentation improvements only.
v1.0.1
- Added a new reference file `references/mcp.md` detailing the MCP execution layer and workflow requirements. - Updated MCP tool list: replaced `cex_delivery_list_delivery_account_book` and `cex_fx_list_futures_account_book` with `cex_dc_list_dc_account_book` and `cex_fx_list_fx_account_book` for more accurate account balance operations. - Skill spec now instructs strict adherence to the new `references/mcp.md` for MCP handling, with `SKILL.md` focused on intent routing and account mapping. - Improved and clarified internal documentation, description, and triggers for transfer intent detection. - No changes to the user-facing workflow or supported scenarios.
v1.0.0
Gate Exchange internal transfer skill – initial release: - Enables same-UID internal transfers between Gate accounts: spot, margin, perpetual, delivery, and options. - Execution only after explicit user confirmation and successful source balance check. - Implements all main user scenarios: missing/mismatched info, success/failure flows, and confirmation protocols. - Only supports internal transfers (no main-sub or sub-main) in this phase. - Exposes clear Transfer Draft and Result Report flows for transparency and control.
元数据
Slug gate-exchange-transfer
版本 1.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Gate Exchange Transfer 是什么?

Gate Exchange same-UID internal transfer skill. Use when the user asks to move funds between their own Gate accounts. Triggers on 'transfer funds', 'move USD... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 162 次。

如何安装 Gate Exchange Transfer?

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

Gate Exchange Transfer 是免费的吗?

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

Gate Exchange Transfer 支持哪些平台?

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

谁开发了 Gate Exchange Transfer?

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

💬 留言讨论