Gate 交易所同 UID 内部转账技能。用户请求在自己 Gate 账户间转移资金时触发。触发词:转账资金、移动 USD 等。
⚠️ 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
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)
MCP ServerStatusGate (main)✅ Required
Query Operations (Read-only)
Execution Operations (Write)
GATE_API_KEY, GATE_API_SECRET)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.PreconditionIf not metUser logged inDo not call API; prompt to log in (exception flow).Account mode knownInfer from context or assume classic: Spot ↔ USDT perpetual. For unified/trading account advanced mode: Trading account ↔ BTC perpetual.Source balance verifiableCall balance API for from account before showing draft; if unavailable, prompt user to check on web.
Every internal transfer is fully specified by four elements. The assistant must resolve or infer them before showing a Transfer Draft.
ElementAPI paramRequired whenNotesFromfromAlwaysspot | margin | futures | delivery | optionsTotoAlwaysSame enum as fromCurrencycurrencyAlwaysUSDT, BTC, etc. (platform-supported). Missing → auto-complete by target (case2).AmountamountAlwaysString, > 0, up to 8 decimals. Missing → ask user (case8).
Conditional params
currency_pair required (e.g. BTC_USDT) when from or to is margin.settle required ( usdt | btc) when from or to is futures or delivery.EndpointMethodMeaningRate limit/wallet/transfersPOSTSame-UID internal transfer80 req/10s
GroupTool ( jsonrpc: call.method)Main account internal transfercex_wallet_create_transfer
CaseScenarioActioncase1All four elements presentShow Transfer Draft → confirm → call API → Transfer Result Reportcase2Currency missingAuto-complete currency by target account → same as case1case3Transfer completed (API success)Output Transfer Result Report + product suggestioncase4Insufficient balancePre-check fails; no API call; show shortfall and suggest deposit/adjustcase5Missing from/to or ambiguous intentShow missing-info card; do not call APIcase6Account mode conflict (e.g. trading account → USDT perpetual not allowed)Explain and suggest alternative pathcase7Currency vs To mismatch (e.g. USDT to BTC perpetual)Auto-correct or prompt correction → then case1case8Amount missingAsk for amount; after user provides, proceed to case1/case2case9User cancels or declines after draftAcknowledge; do not call APIcase10Confirmation ambiguous or staleRe-present draft; ask for explicit "Confirm" / "Yes"; do not executecase11Rate limit / service errorDo not retry blindly; prompt retry later or use web UI
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)currencyamountsettle (for futures/delivery), currency_pair (for margin)Confirmation rule
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
from, to, currency, amount; add settle or currency_pair if needed.cex_wallet_create_transfer.Request mapping
IntentAPI parameterValuesSource accountfromspot | margin | futures | delivery | optionsTarget accounttospot | margin | futures | delivery | optionsCurrencycurrencyUSDT, BTC, etc.AmountamountString, > 0, up to 8 decimalsMargin paircurrency_pairRequired if from/to is margin, e.g. BTC_USDTSettlementsettleRequired if from/to is futures or delivery: usdt | btc
Trigger
"Transfer 100 to my USDT-margined account" / "Transfer 500 to futures" / "Transfer 1000 to perpetual"
Logic
Set currency by target account:
Target accountDefault currencyUSDT perpetual (futures settle=usdt)USDTBTC perpetual (futures settle=btc)BTCTradFiUSDTDeliveryUSDTOptionsUSDTSpot / marginInfer 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."
Trigger
User confirmed; cex_wallet_create_transfer returned success.
Output
Trigger
Pre-check: source available balance < 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."
Trigger
"Contract is about to be liquidated, transfer some funds for margin" / "Top up my futures margin" / "How do I adjust account funds"
Logic
Output
"I can help with margin top-up. Please specify: from account, to account, and currency (and amount if you know it)."
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."
Trigger
"Transfer some USDT to my BTC perpetual account"
Logic
BTC perpetual settles in BTC; USDT is inconsistent.
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."
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.
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."
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')."
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."
ExceptionHandlingBlock executionNot logged inPrompt to log inYesInsufficient balanceShow shortfall + suggest deposit/adjust (case4)YesInvalid account path (e.g. from/to not allowed)Guide user to correct (case5/case6)No, guideUser cancel / declineAcknowledge (case9)YesConfirmation missing/ambiguousRe-present draft, ask explicit confirm (case10)YesRate limit / service errorRetry later or use web (case11)YesRisk control / quotaShow clear reasonYes
json
{
"currency": "USDT",
"from": "spot",
"to": "futures",
"amount": "100",
"currency_pair": "",
"settle": "usdt"
}
API valueProduct namespotSpotmarginIsolated marginfuturesPerpetual (use settle)deliveryDeliveryoptionsOptions
settleAccountusdtUSDT perpetualbtcBTC perpetual
Required when from or to is margin; e.g. BTC_USDT.
After a transfer, user may ask for history. By account type:
AccountQuery tool (if MCP provides)NotesSpotcex_spot_list_spot_account_bookcurrency, time, limitPerpetualcex_fx_list_fx_account_booksettle, type=dnwDeliverycex_dc_list_dc_account_booksettle, type=dnwMargincex_margin_list_margin_account_bookcurrency_pair, time, limitOptionscex_options_list_options_account_bookper MCP docs
REST: Delivery GET /delivery/{settle}/account_book?type=dnw; Perpetual GET /futures/{settle}/account_book?type=dnw; Margin GET /margin/account_book.
CodeMeaningBALANCE_NOT_ENOUGHInsufficient balance; do not retry same amountTOO_MANY_REQUESTSRate limit; prompt retry later (case11)QUOTA_NOT_ENOUGHQuota exceeded; show message
POST /wallet/transfers ( cex_wallet_create_transfer). No main-sub in Phase 1.currency_pair for margin; settle for futures/delivery.