This is an L2 composite skill that orchestrates 58 deduplicated MCP tool calls (54 read + 4 write) across 7 L1 skills. It provides a unified entry point for account and asset overview, margin and liquidation risk assessment, SimpleEarn and staking earnings snapshots, affiliate commission queries, and unified-account write operations (borrowing, collateral, leverage settings).
This skill is intended for users aged 18 or above with full civil capacity.
⚠️ 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 gate-runtime-rules.md
MCP ServerStatusGate (main)✅ Required
Query Operations (Read-only)
Execution Operations (Write)
gate-mcp-cursor-installergate-mcp-codex-installergate-mcp-claude-installergate-mcp-openclaw-installerRead and strictly follow references/mcp.md, then execute module routing in this skill.
SKILL.md keeps orchestration/routing logic across account domains.references/mcp.md is the authoritative MCP execution layer for module aggregation, partial degradation strategy, and unified mutation safeguards.ModuleL1 SourceTool CountRead/WritePurposeS1 Assets / Overviewgate-exchange-assets, gate-exchange-alpha10+Read onlyMulti-account balance panoramaS2 Risk / Margingate-exchange-unified, gate-exchange-marketanalysis6+Read onlyMargin ratio, liquidation price, unrealised PnLS3 Earn / Yieldgate-exchange-simpleearn, gate-exchange-staking4Read onlyCurrent SimpleEarn and staking position/interest snapshotsS4 Affiliate / Rebategate-exchange-affiliate7Read onlyRebate user info (may be empty), partner commissions history, sub-relationsS5 Borrow / Transfer (Write)gate-exchange-unified62 Read + 4 WriteBorrow, set collateral, set leverage, switch mode
Note: TradFi tools (from gate-exchange-tradfi, 10 read tools) are all read-only and used for asset inventory queries. They are included in the deduplicated 58-tool count but not listed as a separate L1 module in the sub-module table above.
User queries often span multiple dimensions (e.g. "check my earn interest and will I get liquidated" covers S3 and S2). Instead of forcing single-intent classification, this skill uses signal overlay: each of 5 signal dimensions is independently detected from the query, and the activated dimensions contribute their respective tool sets. The final tool set is the union of all activated signals, deduplicated before execution.
SignalDimensionTrigger ConditionTrigger KeywordsTool SubsetS1Assets / OverviewUser asks about overall assets, multi-account balances, asset inventory; also covers read-only borrowable/rate inquiry (no execution intent) and transferable limit snapshotsassets, balance, account, how much, total assets, inventory; borrowable (inquiry only), transferable limitcex_wallet_get_total_balance, cex_spot_get_spot_accounts, cex_unified_get_unified_accounts, cex_fx_get_fx_accounts, cex_margin_list_margin_accounts, cex_options_list_options_account, cex_earn_list_user_uni_lends, cex_earn_asset_list, cex_alpha_list_alpha_accounts, cex_tradfi_query_user_assets; inquiry subset: + cex_unified_get_unified_borrowable, cex_unified_get_unified_estimate_rate, cex_unified_get_unified_transferableS2Risk / MarginUser asks about liquidation, margin, liquidation price, unrealised PnL, position riskliquidation, margin, liquidation price, unrealised PnL, position, risk, margin callcex_unified_get_unified_accounts, cex_fx_list_fx_positions, cex_fx_get_fx_tickers, cex_fx_get_fx_contract, cex_fx_get_fx_funding_rate, cex_fx_get_fx_premium_indexS3Earn / YieldUser asks about existing SimpleEarn or staking positions, accrued interest and rewards (snapshot only, not product selection)earn position, staking position, interest, yield, rewardscex_earn_list_user_uni_lends, cex_earn_get_uni_interest, cex_earn_asset_list, cex_earn_award_list (Note: does not include list_uni_currencies / list_uni_rate / find_coin which are product-selection tools; those requests route to smart earn)S4Affiliate / RebateUser asks about affiliate status, partner data, commissionsrebate, affiliate, commission, partner, broker, referralcex_rebate_user_info, cex_rebate_partner_commissions_history, cex_rebate_partner_sub_list, cex_rebate_partner_transaction_history, cex_rebate_user_sub_relation, cex_rebate_broker_commission_history, cex_rebate_broker_transaction_historyS5Borrow / Transfer (Write)User has explicit execution intent: borrow amount, add margin, set collateral, switch mode. Does NOT activate for inquiry-only queries like "how much can I borrow" with negation like "don't borrow yet"borrow [amount], add margin, transfer to futures, set collateral, switch modecex_unified_get_unified_borrowable, cex_unified_get_unified_estimate_rate, cex_unified_create_unified_loan, cex_unified_set_unified_collateral, cex_unified_set_unified_mode, cex_unified_set_user_leverage_currency_setting
text
Input: User Query
Output: activated_signals[] + params{action_type, accounts[]}
1. Parameter Extraction
Extract accounts[] (account types mentioned, 0-N)
Extract action_type (borrow / transfer / add margin / setting / none)
2. Signal Detection (each dimension independent, non-exclusive, multi-select)
S1 <- contains asset/balance/account/inventory expressions
S2 <- contains liquidation/margin/position/risk expressions
S3 <- contains earn/staking position/interest/rewards expressions
S4 <- contains rebate/affiliate/commission/partner expressions
S5 <- contains borrow/transfer/add-margin/setting expressions AND execution intent
3. Fallback Rules (if no signal explicitly activated)
Vague account intent (e.g. "check my account") -> default S1 (asset overview)
Account + risk keywords (e.g. "is it safe") -> default S1 + S2
4. Execution Mode
S5 not activated -> read-only mode (query and summarise)
S5 activated -> read+write mode (query -> Action Draft -> confirm -> execute)
5. Tool Set Assembly
Tool Set = Union(all activated signal tool subsets)
Deduplicate same tool + same parameters
Independent tools run in parallel; S5 write operations run serially after reads
User IntentRoute ToTrade execution (spot/futures open/close)Trading copilot skillCoin research, market analysis, newsMarket research skillIdle fund allocation, product selection, APY comparisonSmart earn skillFlash swap / coin exchangeFlash swap skillSub-account managementNot in scopeAsset weekly report, cross-period analysisNot supported by current API; guide to App reportsTotal PnL ledger across all business linesData source calibration unreliable; display per-module snapshots
User QueryaccountsActivated SignalsExplanation"Check my account"[]S1 (fallback)No explicit dimension keyword; fallback to asset overview"How much do I have, will I get liquidated?"[]S1 + S2"how much" triggers S1, "liquidated" triggers S2"Is my unified margin sufficient?"[unified]S2"margin" triggers risk"Show liquidation prices and unrealised PnL"[]S2"liquidation price / unrealised PnL" triggers risk"How much did earn and staking make?"[]S3"earn / staking / how much" triggers yield"Should I put idle funds in SimpleEarn or staking?"[]—Route to smart earn; this skill does not do fund allocation"How much rebate do I have?"[]S4"rebate" triggers affiliate"Margin is low, help me add margin"[]S2 + S5"margin low" triggers S2, "add margin" triggers S5 write"How much can I borrow? Don't borrow yet"[]S1Negation of execution -> does NOT activate S5; uses borrowable + estimate_rate (inquiry subset)"How much can I borrow? Borrow 500 USDT"[]S5Execution intent -> query then Action Draft -> confirm -> create_loan"How much USDT can I transfer out? (don't transfer)"[unified]S1Transferable limit read-only -> transferable + unified_accounts; not a transfer execution"Show total assets + futures margin together (no analysis)"[]S1 + S2Factual snapshot, no S3, no health/PnL narrative"Make me an asset weekly report / total PnL ledger"[]—Not accepted: API cannot support reliable asset analysis or total PnL; explain boundary and guide to App reports"About to get liquidated, any spare spot balance? Can I add margin?"[]S2 + S1 + S5"liquidated" triggers S2, "spot balance" triggers S1, "add margin" triggers S5
Some user queries can be satisfied by a single L1 skill's tools (e.g. "how much do I have" only needs a few assets tools). This L2 provides a more comprehensive aggregated report through cross-L1 orchestration.
When a user query contains both account/risk intent and other L2 intents (e.g. "check my account, then buy BTC"):
ScenarioHandlingUser says "check my account" with no detailsFallback S1 (asset overview), output full asset panoramaUser says "is it safe" / "am I OK"Fallback S1 + S2, output asset panorama + margin/liquidation assessmentUser asks about sub-accountsExplicitly state "this skill does not cover sub-account management"Write operation parameters incomplete (e.g. "borrow" without amount)Ask to complete: "Please confirm the currency and amount to borrow"; do not guessMultilingual / mixed Chinese-English promptsParse intent and parameters normally; if identifiable as account/asset/risk, enter this skillUser asks "which earn product is best"Product recommendation scope; route to smart earn. This skill only queries existing positions/yieldscex_rebate_user_info returns an empty objectStill produce the S4 section from cex_rebate_partner_commissions_history and other S4 tools; do not treat empty user_info as "no affiliate data". See Domain Knowledge: Affiliate / rebate data (S4).
cex_unified_get_unified_accounts needed by both S1 and S2 only executes once#Tool NameR/WPurpose1cex_wallet_get_total_balanceRTotal balance in USDT equivalent2cex_spot_get_spot_accountsRSpot account per-currency balances3cex_unified_get_unified_accountsRUnified account equity/margin/loans4cex_fx_get_fx_accountsRFutures account available balance5cex_options_list_options_accountROptions account balance6cex_margin_list_margin_accountsRIsolated margin accounts7cex_tradfi_query_user_assetsRTradFi account equity8cex_earn_list_dual_balanceRDual investment balance9cex_earn_list_dual_ordersRDual investment orders10cex_earn_list_structured_ordersRStructured product orders11cex_spot_list_spot_account_bookRSpot account ledger
#Tool NameR/WPurpose12cex_unified_get_unified_accountsRUnified account equity/margin ratio/loan balance13cex_unified_get_unified_modeRCurrent unified account mode14cex_unified_get_unified_borrowableRBorrowable limit per currency15cex_unified_get_unified_transferableRTransferable limit16cex_unified_get_unified_estimate_rateRHourly estimated unified-account borrow rate per currency (API string decimals; not annualized APR/APY). See Domain Knowledge: Unified account estimated borrow rate.17cex_unified_list_unified_currenciesRSupported unified currencies18cex_unified_list_unified_loan_recordsRLoan records19cex_unified_list_unified_loan_interest_recordsRLoan interest records20cex_unified_get_user_leverage_currency_settingRPer-currency leverage setting21cex_unified_list_currency_discount_tiersRCollateral discount tiers22cex_unified_set_unified_modeWSwitch unified account mode23cex_unified_create_unified_loanWExecute borrow/repay24cex_unified_set_user_leverage_currency_settingWSet per-currency leverage25cex_unified_set_unified_collateralWSet collateral currencies
#Tool NameR/WPurpose26cex_earn_list_uni_currenciesRSimpleEarn supported currencies27cex_earn_get_uni_currencyRSingle currency SimpleEarn details28cex_earn_list_user_uni_lendsRUser SimpleEarn positions29cex_earn_get_uni_interestRSimpleEarn interest earnings30cex_earn_list_uni_rateRSimpleEarn APY rates
#Tool NameR/WPurpose31cex_earn_asset_listRStaking positions32cex_earn_award_listRStaking reward records33cex_earn_find_coinRStakeable coin search34cex_earn_order_listRStaking order history
#Tool NameR/WPurpose35cex_spot_get_spot_order_bookRSpot order book36cex_spot_get_spot_candlesticksRSpot K-line data37cex_spot_get_spot_tickersRSpot ticker snapshot38cex_spot_get_spot_tradesRSpot trade records39cex_fx_get_fx_contractRFutures contract specs40cex_fx_get_fx_order_bookRFutures order book41cex_fx_get_fx_candlesticksRFutures K-line data42cex_fx_get_fx_tickersRFutures ticker (mark price)43cex_fx_get_fx_tradesRFutures trade records44cex_fx_get_fx_funding_rateRFunding rate45cex_fx_list_fx_liq_ordersRLiquidation orders46cex_fx_get_fx_premium_indexRBasis/premium index
#Tool NameR/WPurpose47cex_fx_list_fx_positionsRAll futures positions (unrealised PnL, liquidation price)
#Tool NameR/WPurpose48cex_rebate_user_infoRUser rebate summary (may return an empty object; rely on commissions history when empty)49cex_rebate_user_sub_relationRUser affiliate relationship50cex_rebate_partner_sub_listRPartner client list51cex_rebate_partner_commissions_historyRPartner commission history52cex_rebate_partner_transaction_historyRClient transaction history53cex_rebate_broker_commission_historyRBroker commission history54cex_rebate_broker_transaction_historyRBroker transaction history
#Tool NameR/WPurpose55cex_alpha_list_alpha_currenciesRAlpha supported currencies56cex_alpha_list_alpha_tokensRAlpha token list57cex_alpha_list_alpha_tickersRAlpha ticker snapshot58cex_alpha_list_alpha_accountsRUser Alpha positions
cex_* tool names in user-facing output; use natural language like "no records found" instead.cex_unified_get_unified_estimate_rate)#"0.000002"). This matches the public API contract: hourly estimate, not a fixed annual quote.cex_earn_list_uni_rate expose product APY-style figures; they are a different product line from unified-account borrow estimates. Do not mix units in one sentence without naming each source.MisconceptionRealityThe number from cex_unified_get_unified_estimate_rate is an annual percentage (APR)It is an hourly estimated borrow rate per currency. Label it as hourly; only annualize with explicit conversion and “reference only” wording if the user asks."Check my account and buy BTC" will execute trades via this skillThis skill only handles account/asset/risk queries and limited write operations (borrow/settings). Trading execution routes to the trading copilot.Liquidation warning equals the actual liquidation lineThis skill evaluates risk based on snapshot data. Always note "subject to the exchange's actual liquidation rules."This skill can query or manage sub-accountsThis skill covers main account only; sub-account management is out of scope."Should I put idle funds in SimpleEarn or staking" will be answered by this skillProduct selection and fund allocation route to the smart earn skill. This skill only provides position and yield snapshots for existing holdings.Empty cex_rebate_user_info means I have no commissionsPartner commission rows may still exist in cex_rebate_partner_commissions_history; empty user_info does not block an S4 report.
cex_rebate_user_info may return an empty object. You can still build a meaningful S4 report from cex_rebate_partner_commissions_history (and other S4 read tools such as partner sub list and transaction history). Empty user_info does not mean there is no commission data.cex_rebate_partner_commissions_history returns historical commission rows. commissionAsset is commonly USDT or POINT; rows may also carry a source dimension such as FUTURES, SPOT, TradFi, or ALPHA (names as returned by the API).user_info does not expose a ready-made cumulative rebate figure, do not invent a single "total rebate" number. To state aggregate USDT and POINT from history alone, you must page through the full history (use the API's offset/limit parameters, e.g. limit 100 per request), repeat until no more rows, then sum commissionAmount grouped by commissionAsset. If the session has not completed all pages, state that explicitly and do not guess totals.gate-runtime-rules.md — Exchange runtime rules (precision, price limits), referenced before executing borrow operationsNote: Unified account specifications (margin ratio calculation, borrowing rules, mode switching constraints) are embedded in the Domain Knowledge and Safety Rules sections of this SKILL.md. For detailed unified-account rules, refer to the gate-exchange-unified L1 skill.
Category: Strong confirmation · Action Draft — All unified-account mutations below use an Action Draft plus an explicit user confirmation in the immediately preceding turn. There is no silent execution.
Risk levelOperation typeInvolved toolsConfirmation requirementMediumSwitch unified account mode / set per-currency leverage / set collateralcex_unified_set_unified_mode, cex_unified_set_user_leverage_currency_setting, cex_unified_set_unified_collateralSingle confirmation plus a risk disclosure in the Action Draft. If the operation includes mode switch ( cex_unified_set_unified_mode), the draft must state that the mode change is irreversible (or equivalent clear wording).HighLending — borrow or repaycex_unified_create_unified_loanAction Draft must list amount, currency, and estimated or applicable interest rate (from cex_unified_get_unified_estimate_rate — hourly estimate — or API response), then user confirmation before execution.
Implementation notes
cex_unified_get_unified_estimate_rate: Treat returned rates as hourly estimates when quoting to the user or filling Action Drafts (see Domain Knowledge: Unified account estimated borrow rate).All write operations require explicit user confirmation before execution. The confirmation flow is:
Risk LevelOperationsToolsConfirmationMediumSwitch unified mode, set leverage, set collateralcex_unified_set_unified_mode, cex_unified_set_user_leverage_currency_setting, cex_unified_set_unified_collateralAction Draft + single confirmation + risk note; mode switch: irreversibility must be statedHighBorrow / Repaycex_unified_create_unified_loanAction Draft with amount, currency, interest rate → user confirmation
Without explicit user confirmation, no write operation is executed. Only read and query operations are allowed.
If parameters change after confirmation (different currency, amount, or operation type), the previous confirmation is invalidated and a new Action Draft must be presented.
Error TypeHandling StrategySingle read tool timeout/errorSkip that dimension, note "this section is temporarily unavailable", continue other dimensionsWrite tool failureDo not retry; explain failure reason and guide user to App/Web for manual operationMissing required parameter (write)Ask user to specify (e.g. "Please confirm the currency and amount to borrow")Unrecognisable intentFall back to S1 (asset overview)Tool call returns empty dataUse natural language "no records found"; do not display tool names
markdown
## Account and Asset Risk Report
| Dimension | Status |
|-----------|--------|
| Data Timestamp | {timestamp} |
| Activated Signals | {S1/S2/S3/S4} |
### S1 Asset Overview (if activated)
{asset_panorama_table}
### S2 Risk and Margin (if activated)
{margin_and_position_risk_table}
Note: Liquidation prices and margin ratios are reference values. Subject to the exchange's actual liquidation rules.
### S3 Earn Snapshot (if activated)
{simpleearn_and_staking_summary}
### S4 Affiliate Report (if activated)
{rebate_and_commission_summary}
Note: If `cex_rebate_user_info` is empty, rely on `cex_rebate_partner_commissions_history` (and other S4 tools). Do not fabricate lifetime USDT/POINT totals unless all history pages were fetched and summed by `commissionAsset`. Point to App/Web partner center for official cumulative figures when appropriate.
Medium-risk settings ( set_unified_mode, set_user_leverage_currency_setting, set_unified_collateral):
markdown
## Action Draft (medium-risk · strong confirmation)
| Item | Value |
|------|-------|
| Operation | {set collateral / set leverage / switch unified mode} |
| Target | {currency / mode / leverage value} |
| Amount or config | {as applicable} |
| Risk warning | {e.g. impact on margin; if mode switch: **this change is irreversible**} |
Reply **Y** to confirm or **N** to cancel.
High-risk lending ( create_unified_loan — borrow or repay):
markdown
## Action Draft (high-risk · strong confirmation)
| Item | Value |
|------|-------|
| Operation | {borrow / repay} |
| Currency | {e.g. USDT} |
| Amount | {numeric amount} |
| Interest rate | {hourly estimated rate from `cex_unified_get_unified_estimate_rate` / API; state **hourly** — not APR unless explicitly converted and labeled reference-only} |
| Risk warning | {e.g. interest accrual, repayment obligation} |
Reply **Y** to confirm or **N** to cancel.