⚠️ 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 this skill's routing/case logic.
SKILL.md remains the intent routing and scenario map.references/mcp.md is the authoritative MCP execution layer for tool contracts, pre-checks, confirmation gates, and degraded handling.GroupTool Calls ( jsonrpc: call.method)Account and balancescex_spot_get_spot_accounts, cex_spot_list_spot_account_bookPlace/cancel/amend orderscex_spot_create_spot_order, cex_spot_create_spot_batch_orders, cex_spot_cancel_all_spot_orders, cex_spot_cancel_spot_order, cex_spot_cancel_spot_batch_orders, cex_spot_amend_spot_order, cex_spot_amend_spot_batch_ordersTrigger orders (price orders)cex_spot_create_spot_price_triggered_order, cex_spot_list_spot_price_triggered_orders, cex_spot_get_spot_price_triggered_order, cex_spot_cancel_spot_price_triggered_order, cex_spot_cancel_spot_price_triggered_order_listOpen orders and fillscex_spot_list_spot_orders, cex_spot_list_spot_my_tradesMarket datacex_spot_get_spot_tickers, cex_spot_get_spot_order_book, cex_spot_get_spot_candlesticksTrading rulescex_spot_get_currency, cex_spot_get_currency_pairFeescex_wallet_get_wallet_fee, cex_spot_get_spot_batch_fee
BASE_QUOTE format for trading pairs, for example BTC_USDT.min_quote_amount (commonly 10U).min_base_amount / amount_precision).When calling cex_spot_create_spot_order with type=market, fill amount by side:
sideamount meaningExamplebuyQuote-currency amount (USDT)"Buy 100U BTC" -> amount="100"``sellBase-currency quantity (BTC/ETH, etc.)"Sell 0.01 BTC" -> amount="0.01"
Pre-check before execution:
buy market order: verify quote-currency balance can cover amount (USDT).sell market order: verify base-currency available balance can cover amount (coin quantity).When the user asks for any spot trading operation, follow this sequence.
Classify the request into one of these six categories:
Extract key fields:
currency / currency_pairside ( buy/ sell)amount (coin quantity) or quote_amount (USDT amount)price or price condition (for example "2% below current")When type=market, normalize parameters as:
side=buy: amount = quote_amount (USDT amount)side=sell: amount = base_amount (base-coin quantity)Pre-check order:
Before every cex_spot_create_spot_order, cex_spot_create_spot_batch_orders, or cex_spot_create_spot_price_triggered_order, always provide an Order Draft first, then wait for explicit confirmation.
Required execution flow:
Required confirmation fields:
currency_pair)buy/sell, market/limit)amount meaning and valueRecommended draft wording:
Order Draft: BTC_USDT, buy, market, amount=100 USDT, estimated fill around current ask, risk: slippage in fast markets. Reply "Confirm order" to place it.Allowed confirmation responses (examples):
Confirm order, Confirm, Proceed, Yes, place itHard blocking rules (non-bypassable):
cex_spot_create_spot_order, cex_spot_create_spot_batch_orders, or cex_spot_create_spot_price_triggered_order unless the user explicitly confirms in the immediately previous turn.If user confirmation is missing, ambiguous, or negative:
Use only the minimal tool set required for the task:
cex_spot_get_spot_accountscex_spot_get_currency_paircex_spot_get_spot_tickerscex_spot_create_spot_order / cex_spot_create_spot_batch_orderscex_spot_create_spot_price_triggered_order / cex_spot_list_spot_price_triggered_orders / cex_spot_get_spot_price_triggered_order / cex_spot_cancel_spot_price_triggered_order / cex_spot_cancel_spot_price_triggered_order_listcex_spot_cancel_all_spot_orders / cex_spot_cancel_spot_order / cex_spot_cancel_spot_batch_orders / cex_spot_amend_spot_order / cex_spot_amend_spot_batch_orderscex_spot_list_spot_orders (use status=open)cex_spot_list_spot_my_tradescex_spot_list_spot_account_bookcex_spot_get_spot_batch_feeThe response must include:
CaseUser IntentCore DecisionTool Sequence1Market buyPlace market buy if USDT is sufficientcex_spot_get_spot_accounts → cex_spot_create_spot_order2Buy at target priceCreate a limit buy ordercex_spot_get_spot_accounts → cex_spot_create_spot_order3Buy with all balanceUse all available USDT balance to buycex_spot_get_spot_accounts → cex_spot_create_spot_order4Buy readiness checkCurrency status + min size + current unit pricecex_spot_get_currency → cex_spot_get_currency_pair → cex_spot_get_spot_tickers5Asset summaryConvert all holdings to USDT valuecex_spot_get_spot_accounts → cex_spot_get_spot_tickers6Cancel all then check balanceCancel all open orders and return balancescex_spot_cancel_all_spot_orders → cex_spot_get_spot_accounts7Sell dustSell only if minimum size is metcex_spot_get_spot_accounts → cex_spot_get_currency_pair → cex_spot_create_spot_order8Balance + minimum buy checkPlace order only if account balance and min_quote_amount are both satisfiedcex_spot_get_spot_accounts → cex_spot_get_currency_pair → cex_spot_create_spot_order
CaseUser IntentCore DecisionTool Sequence9Buy 2% lowerPlace limit buy at current price -2%cex_spot_get_spot_tickers → cex_spot_create_spot_order10Sell at +500Place limit sell at current price +500cex_spot_get_spot_tickers → cex_spot_create_spot_order11Buy near today's lowBuy only if current price is near 24h lowcex_spot_get_spot_tickers → cex_spot_create_spot_order12Sell on 5% drop requestCalculate target drop price and place sell limit ordercex_spot_get_spot_tickers → cex_spot_create_spot_order13Buy top gainerAuto-pick highest 24h gainer and buycex_spot_get_spot_tickers → cex_spot_create_spot_order14Buy larger loserCompare BTC/ETH daily drop and buy the bigger losercex_spot_get_spot_tickers → cex_spot_create_spot_order15Buy then place sellMarket buy, then place sell at +2% reference pricecex_spot_create_spot_order → cex_spot_create_spot_order16Fee estimateEstimate total cost from fee rate and live pricecex_wallet_get_wallet_fee → cex_spot_get_spot_tickers
CaseUser IntentCore DecisionTool Sequence17Raise price for unfilled orderConfirm how much to raise (or target price), locate unfilled buy orders, confirm which order to amend if multiple, then amend limit pricecex_spot_list_spot_orders(status=open) → cex_spot_amend_spot_order18Verify fill and holdingsLast buy fill quantity + current total holdingscex_spot_list_spot_my_trades → cex_spot_get_spot_accounts19Cancel if not filledIf still open, cancel and then recheck balancecex_spot_list_spot_orders(status=open) → cex_spot_cancel_spot_order → cex_spot_get_spot_accounts20Rebuy at last priceUse last fill price, check balance, then place limit buycex_spot_list_spot_my_trades → cex_spot_get_spot_accounts → cex_spot_create_spot_order21Sell at break-even or betterSell only if current price is above cost basiscex_spot_list_spot_my_trades → cex_spot_get_spot_tickers → cex_spot_create_spot_order22Asset swapEstimate value, if >=10U then sell then buycex_spot_get_spot_accounts → cex_spot_get_spot_tickers → cex_spot_create_spot_order(sell) → cex_spot_create_spot_order(buy)23Buy if price condition metBuy only when current < 60000, then report balancecex_spot_get_spot_tickers → cex_spot_create_spot_order → cex_spot_get_spot_accounts24Buy on trend conditionBuy only if 3 of last 4 hourly candles are bullishcex_spot_get_spot_candlesticks → cex_spot_create_spot_order25Fast-fill limit buyUse best opposite-book price for fast executioncex_spot_get_spot_order_book → cex_spot_create_spot_order
CaseUser IntentCore DecisionTool Sequence26Filter and batch-cancel selected open ordersVerify target order ids exist in open orders, show candidate list, cancel only after user verificationcex_spot_list_spot_orders(status=open) → cex_spot_cancel_spot_batch_orders27Market slippage simulationSimulate average fill from order-book asks for a notional buy, compare to last pricecex_spot_get_spot_order_book → cex_spot_get_spot_tickers28Batch buy placementCheck total required quote amount vs available balance, then place multi-order basketcex_spot_get_spot_accounts → cex_spot_create_spot_batch_orders29Fee-rate comparison across pairsCompare fee tiers and translate fee impact into estimated costcex_spot_get_spot_batch_fee → cex_spot_get_spot_tickers30Account-book audit + current balanceShow recent ledger changes for a coin and current remaining balancecex_spot_list_spot_account_book → cex_spot_get_spot_accounts31Batch amend open buy orders by +1%Filter open orders by pair, select up to 5 target buy orders, reprice and batch amend after user verificationcex_spot_list_spot_orders(status=open) → cex_spot_amend_spot_batch_orders
CaseUser IntentCore DecisionTool Sequence32Conditional buy trigger orderRead current BTC price, compute 5% drop trigger, place buy trigger after confirmationcex_spot_get_spot_tickers → cex_spot_create_spot_price_triggered_order33Dual TP/SL trigger placementCheck ETH available balance, build TP and SL trigger legs, confirm then place bothcex_spot_get_spot_accounts → cex_spot_create_spot_price_triggered_order → cex_spot_create_spot_price_triggered_order34Single trigger order progress queryRead trigger-order detail and compare against live market price to compute distance to triggercex_spot_get_spot_price_triggered_order → cex_spot_get_spot_tickers35Batch cancel BTC buy trigger ordersList open trigger orders, filter BTC buy side, confirm scope, then batch cancelcex_spot_list_spot_price_triggered_orders(status=open) → cex_spot_cancel_spot_price_triggered_order_list36Single trigger/TP-SL order cancelVerify one target trigger order is active, then cancel after confirmationcex_spot_get_spot_price_triggered_order → cex_spot_cancel_spot_price_triggered_order
ConditionActionUser asks to check balance before buyingMust call cex_spot_get_spot_accounts first; place order only if sufficientUser specifies buy/sell at target priceUse type=limit at user-provided priceUser asks for fastest fill at current marketPrefer market; if "fast limit" is requested, use best book priceMarket buy ( buy)Fill amount with USDT quote amount, not base quantityMarket sell ( sell)Fill amount with base-coin quantity, not USDT amountUser requests take-profit/stop-lossUse trigger-order workflow: validate position size, draft TP+SL legs, then place after explicit confirmationAny order placement requestRequire explicit final user confirmation before cex_spot_create_spot_orderUser has not replied with clear confirmationKeep order as draft; no trading executionConfirmation is stale or not from the immediately previous turnInvalidate it and require a fresh confirmationMulti-leg trading flowRequire per-leg confirmation before each cex_spot_create_spot_orderUser asks to amend an unfilled buy orderConfirm price increase amount or exact target price before cex_spot_amend_spot_orderMultiple open buy orders match amendment requestAsk user to choose which order to amend before executingUser requests selected-order batch cancellationVerify each order id exists/open, present list, and run cex_spot_cancel_spot_batch_orders only after user verificationUser requests batch amend for open ordersFilter target pair open buy orders (max 5), compute repriced levels, and run cex_spot_amend_spot_batch_orders only after user verificationUser requests trigger-order progressRead one trigger order and compare current ticker price to trigger condition; return numeric distanceUser requests trigger-order batch cancellationFilter trigger orders by pair+side, present cancellation scope, then call cex_spot_cancel_spot_price_triggered_order_list after confirmationUser requests single trigger-order cancellationVerify order is active/matching intent, then call cex_spot_cancel_spot_price_triggered_order after confirmationUser requests market slippage simulationUse order-book depth simulation and compare weighted fill vs ticker last priceUser requests multi-coin one-click buyValidate summed quote requirement, then use cex_spot_create_spot_batch_ordersUser requests fee comparison for multiple pairsUse cex_spot_get_spot_batch_fee and convert to cost impact with latest pricesUser requests account flow for a coinUse cex_spot_list_spot_account_book and then reconcile with cex_spot_get_spot_accountsUser amount is too smallCheck min_quote_amount; if not met, ask user to increase amountUser requests all-in buy/sellUse available balance, then trim by minimum trade rulesTrigger condition not metDo not place order; return current vs target price gap
markdown
## Execution Result
| Item | Value |
|------|-----|
| Scenario | {case_name} |
| Pair | {currency_pair} |
| Action | {action} |
| Status | {status} |
| Key Metrics | {key_metrics} |
{decision_text}
Example decision_text:
✅ Condition met. Your order has been placed.📝 Order draft ready. Reply "Confirm order" to execute.⏸️ No order placed yet: current price is 60200, above your target 60000.❌ Not executed: minimum order amount is 10U, your input is 5U.Error TypeTypical CauseHandling StrategyInsufficient balanceNot enough available USDT/coinsReturn shortfall and suggest reducing order sizeMinimum trade constraintBelow minimum amount/sizeReturn threshold and suggest increasing order sizeTrigger-order parameter mismatchTrigger rule/price/side is inconsistent with user intentReturn normalized trigger draft and require user reconfirmationMissing final confirmationUser has not clearly approved final order summaryKeep order pending and request explicit confirmationStale confirmationConfirmation does not match the current draft or is not in the previous turnReject execution and ask for reconfirmationDraft-only modeUser has not confirmed yetOnly run query/estimation tools; do not call cex_spot_create_spot_order, cex_spot_create_spot_batch_orders, or cex_spot_create_spot_price_triggered_orderAmbiguous amendment targetMultiple candidate open buy ordersKeep pending and ask user to confirm order ID/rowBatch-cancel ambiguitySome requested order ids are missing/not-openReturn matched vs unmatched ids and request reconfirmationBatch-amend ambiguityCandidate order set is unclear or exceeds max selectionAsk user to confirm exact order ids (up to 5) before executionOrder missing/already filledAmendment/cancellation target is invalidAsk user to refresh open orders and retryMarket condition not metTrigger condition is not satisfiedReturn current price, target price, and differencePair unavailableCurrency suspended or abnormal statusClearly state pair is currently not tradable
gate-exchange-spot (Case 2/9/23)