skills/gate-exchange-autoinvest/SKILL.md
The fast auto-invest function of Gate Exchange Earn. Use this skill whenever you need to create, update, stop, or top up invest plans and to query supported coins, minimum amounts, records, orders, and plan detail. Trigger phrases include "auto-invest", "DCA", "dollar cost averaging", "invest plan", or equivalent.
npx skillsauth add gate/gate-skills gate-exchange-autoinvestInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The fast auto-invest (DCA) function of Gate Exchange Earn, supporting create, update, stop plans, and query related information.
⚠️ 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 exchange-runtime-rules.md first (mirror: exchange-runtime-rules.md on GitHub).
Digital Asset Trading Risk Statement: Digital asset trading carries significant risks. Prices are subject to high volatility and market manipulation. Past performance is not indicative of future results. This skill provides informational tools only and does not constitute investment advice. Users are solely responsible for their investment decisions. Only invest what you can afford to lose. For full risk disclosure, please visit Gate's official website.
Data Handling Notice: When you use this skill, your queries and account data are processed through AI systems to provide trading assistance. This includes:
Important:
| Module | Description | Trigger Keywords |
|--------|-------------|------------------|
| Plan Management | Create, update, stop, and add position to auto-invest plans | create DCA, auto-invest, stop plan, add to my DCA, dollar cost averaging |
| Information Query | Query supported coins, minimum amounts, execution records, order details, and plan details | min amount, execution history, records, plan detail |
Required Parameters:
Optional Parameters (with defaults):
spot (spot account)auto_invest (purchased assets remain in Spot account)Execution Time Restriction:
plan_period_hour must be an integer from 0 to 23plan_period_hour uses UTC time zone
plan_period_hour: 2references/autoinvest-plans.md → Time Zone Handling section for detailed conversion rulesplan_period_day (create plans only):
0. Full workflow: references/autoinvest-plans.md → Workflow step 6.plan_period_type:
monthly: Day of month 1–30weekly or biweekly: Weekday 1–7 (1 = Monday, 7 = Sunday)daily, hourly, or 4-hourly: Use 1Investment Amount Limits:
cex_earn_get_auto_invest_min_amountcex_earn_list_auto_invest_configcex_earn_get_auto_invest_min_amount to query the minimum amountcex_earn_list_auto_invest_config to query the maximum amountTarget Coins Constraints (for multi-target plans):
Fund Flow (where purchased assets go):
After creating a plan, purchased assets will flow to one of two destinations based on the fund_flow parameter (API field: post-purchase destination):
| API fund_flow | Meaning (EN) | Typical Gate app label (localized; may vary) |
|-----------------|--------------|---------------------------------------------|
| earn | Simple Earn / flexible earn | Often labeled Simple Earn / flexible earn in English locales |
| auto_invest | Spot account (default) | Spot account |
fund_flow: "earn" → Assets automatically transfer to Simple Earn to earn interestfund_flow: "auto_invest" → Assets remain in Spot account for manual management (default)Important:
earn is recommended for passive income on accumulated assetsauto_invest is recommended if user plans to trade or withdraw assets frequentlyearn or auto_invest respectively when calling MCP create/update< or >) in user-facing replies.| # | Tool Name | Type | Function |
|---|-----------|------|----------|
| 1 | cex_earn_create_auto_invest_plan | Write | Create a new auto-invest plan (See Create Plan Constraints) |
| 2 | cex_earn_update_auto_invest_plan | Write | Update an existing plan |
| 3 | cex_earn_stop_auto_invest_plan | Write | Stop a plan (explicit user confirmation before call — same as other writes) |
| 4 | cex_earn_add_position_auto_invest_plan | Write ⚠️ | Add position immediately (Call only once after confirmation, strictly no repeated calls) |
| 5 | cex_earn_list_auto_invest_plans | Query | List user's auto-invest plans |
| 6 | cex_earn_get_auto_invest_plan_detail | Query | View single plan details |
| 7 | cex_earn_list_auto_invest_coins | Query | Query supported target coins |
| 8 | cex_earn_get_auto_invest_min_amount | Query | Query minimum investment amount |
| 9 | cex_earn_list_auto_invest_plan_records | Query | Query plan execution records |
| 10 | cex_earn_list_auto_invest_orders | Query | Query order details |
| 11 | cex_earn_list_auto_invest_config | Query | Query auto-invest configuration options |
| Tool Name | Function |
|-----------|----------|
| cex_spot_get_spot_accounts | Query spot account balance |
| cex_earn_list_user_uni_lends | Optional read-only context for Simple Earn / Uni balances when fund source or debits involve earn (see Execution → balance check) |
| User Request | Tool to Use |
|--------------|-------------|
| List my auto-invest plans | cex_earn_list_auto_invest_plans |
| View single plan details | cex_earn_get_auto_invest_plan_detail |
| Query supported coins | cex_earn_list_auto_invest_coins |
| Query minimum investment amount | cex_earn_get_auto_invest_min_amount |
| View plan execution records | cex_earn_list_auto_invest_plan_records |
| View order details | cex_earn_list_auto_invest_orders |
| Query auto-invest config | cex_earn_list_auto_invest_config |
Example Questions:
Operation: Use the cex_earn_list_auto_invest_coins tool to query, which will return a list of all coins that support auto-invest.
Example Questions:
Operation: Use the cex_earn_get_auto_invest_min_amount tool, need to specify the investment currency (USDT or BTC) and target coins.
Example Questions:
Operation: Use cex_earn_list_auto_invest_plan_records to view execution records, use cex_earn_list_auto_invest_orders to view specific order details.
Return Information Example:
📋 Auto-Invest Execution Records
- Plan: {Plan name or ID}
- Execution count: {count}
- Latest execution: {amount} {currency} → {target coin}
Situation: No matching auto-invest plan found during query.
Prompt: No matching auto-invest plan found. You can create a new auto-invest plan.
cex_earn_list_auto_invest_plans to view all your auto-invest planscex_earn_list_auto_invest_config to view available auto-invest settings and preset options| Module | Document | Purpose |
|--------|----------|---------|
| Plan Management | references/autoinvest-plans.md | Create, update, stop, and top-up (add position) workflows with detailed scenarios |
| Compliance & Rules | references/autoinvest-compliance.md | Investment currency restrictions, region compliance, and funding source rules |
| User Intent | Route to | Key Decision |
|-------------|----------|--------------|
| Create plan | references/autoinvest-plans.md → Scenario 1/2 | Single or multi-target |
| Update plan | references/autoinvest-plans.md | Modify existing plan parameters |
| Stop plan | references/autoinvest-plans.md → Scenario 9 | Terminate automatic deductions |
| Top-up / Add position | references/autoinvest-plans.md → Scenario 10 | One-off extra purchase |
| Query plans | SKILL.md → Tool Mapping | cex_earn_list_auto_invest_plans |
| Query plan detail | SKILL.md → Tool Mapping | cex_earn_get_auto_invest_plan_detail |
| Query supported coins | SKILL.md → Scenario 1 | cex_earn_list_auto_invest_coins |
| Query minimum amount | SKILL.md → Scenario 2 | cex_earn_get_auto_invest_min_amount |
| Query execution records | SKILL.md → Scenario 3 | cex_earn_list_auto_invest_plan_records |
| Query orders | SKILL.md → Tool Mapping | cex_earn_list_auto_invest_orders |
| Ask about restrictions | references/autoinvest-compliance.md | Investment currency, region, funding |
references/autoinvest-plans.md and follow workflowsreferences/autoinvest-compliance.md for rules and restrictionsplan_period_day per Create Plan Constraintscex_spot_get_spot_accounts to verify sufficient fundscex_earn_list_user_uni_lends if applicablecex_earn_stop_auto_invest_plan): Show Action Draft and stop — do not call the tool in that same assistant turn. Call stop only after the user's next message contains explicit confirmation (references/autoinvest-plans.md → Scenario 9).Dollar-Cost Averaging (DCA) is an investment strategy where you invest a fixed amount at regular intervals, regardless of market conditions. This approach:
| Aspect | Auto-Invest (DCA) | Manual Trading | |--------|-------------------|----------------| | Execution | Automatic, scheduled | Manual, on-demand | | Discipline | High (no emotion) | Varies (emotion-driven) | | Timing | Spread over time | Single point | | Use case | Long-term accumulation | Active trading | | Skill required | Low | High |
| Period Type | Description | Min Interval | |-------------|-------------|--------------| | Hourly | Every N hours | 1 hour | | Daily | Every day at specified hour | 1 day | | Weekly | Every week on specified day | 7 days | | Biweekly | Every 2 weeks | 14 days | | Monthly | Every month on specified day | ~30 days |
After creating a plan, purchased assets flow to one of two destinations:
| Option | Field Value | Destination | Chinese UI (typical) | Description | Use Case |
|--------|-------------|-------------|----------------------|-------------|----------|
| Simple Earn | fund_flow: "earn" | Simple Earn | Localized app label | Assets automatically transfer to Simple Earn to earn interest | Recommended for: Passive income seekers, long-term holders who want to maximize returns |
| Spot Account | fund_flow: "auto_invest" | Spot Account | Localized app label | Assets remain in Spot account for manual management (default) | Recommended for: Active traders, users who plan to withdraw or transfer assets frequently |
Important Notes:
earn maps to Simple Earn; auto_invest maps to spot account. API values align with localized app strings; if docs and the app disagree, follow the in-app wording.earn option provides additional passive income on accumulated assetsauto_invest option gives you full control to trade, withdraw, or transfer at any timeauto_invest if not specifiedUntil the user has given explicit confirmation for the current Action Draft, do not call any write tool (cex_earn_create_auto_invest_plan, cex_earn_update_auto_invest_plan, cex_earn_stop_auto_invest_plan, cex_earn_add_position_auto_invest_plan). Only read/query operations are allowed—for example: list/detail plans, supported coins, min/max config, execution records and orders, and supporting balance reads (cex_spot_get_spot_accounts, cex_earn_list_user_uni_lends).
All write operations (create, update, stop, add position) MUST follow this confirmation workflow:
Stop plan (cex_earn_stop_auto_invest_plan): Show Action Draft (plan ID, name, effect: future deductions stop) and end the turn asking for confirmation. Call MCP only after the user's following message explicitly confirms — never call stop in the same assistant response as the first draft, even if the user already named a plan ID.
If the user changes any material detail after seeing an Action Draft (amount, targets, cadence, plan ID, fund flow, plan_period_hour, plan_period_day, etc.), treat earlier confirmation as void. Show an updated Action Draft and obtain a fresh explicit confirmation before any write tool call.
⚠️ The cex_earn_add_position_auto_invest_plan tool is extremely sensitive:
Bad practice ❌:
User: "Add more to my plan"
Assistant: [Calls add_position multiple times to show different amounts]
Good practice ✅:
User: "Add more to my plan"
Assistant: "How much would you like to add? Your current plan is 100 USDT per period."
User: "Add 50 USDT"
Assistant: [Shows draft] "Confirm to add 50 USDT?"
User: "Yes"
Assistant: [Calls add_position ONCE]
Before calling any write tool:
| Validation | Rule | Action if Failed |
|------------|------|------------------|
| Investment currency | Must be USDT or BTC | Reject and explain restriction |
| Amount | Must be within [min, max] range | Query min/max, then reject with valid range |
| Execution time | Must be integer 0-23 (on the hour) | Reject and explain hourly restriction |
| plan_period_day (create) | Must not be 0; ranges per plan_period_type (see Create Plan Constraints) | Reject with allowed ranges; see references/autoinvest-plans.md Workflow step 6 |
| Balance | Must be sufficient for first period | Show shortfall, suggest top-up or lower amount |
| Error Condition | Detection | Response |
|-----------------|-----------|----------|
| Too many target coins | User specifies > 10 target coins | Reject immediately: "A plan can have at most 10 target coins. You specified {N} coins. Please reduce the number of targets." |
| Coin allocation too small | Any target coin has ratio < 10 | Reject immediately: "Each target coin must have at least 10% allocation. Coin {X} has only {Y}%. Please adjust the ratios to ensure each coin has at least 10%." |
| Insufficient balance | cex_spot_get_spot_accounts shows balance < amount | Do not proceed. Inform user of shortfall: "Your current balance is {X} {currency}, but {Y} {currency} is required. Please deposit more funds or reduce the investment amount." |
| Invalid investment currency | User specifies currency other than USDT/BTC | Reject immediately: "Only USDT or BTC are supported as investment currency. Please choose USDT or BTC." |
| Amount below minimum | User amount < cex_earn_get_auto_invest_min_amount | Call min amount tool, then inform: "Minimum amount is {min} {currency}. Please increase your investment amount." |
| Amount above maximum | User amount > cex_earn_list_auto_invest_config max | Call config tool, then inform: "Maximum amount is {max} {currency}. Please reduce your investment amount." |
| Invalid execution time | User specifies minutes/seconds or hour outside 0-23 | Reject: "Auto-invest only supports execution on the hour (0-23). Please choose an hour between 0 and 23." |
| Invalid plan_period_day | 0 or out of range for plan_period_type on create | Do not call create; state valid ranges: monthly 1–30; weekly/biweekly 1–7 (1 = Monday); daily/hourly/4-hourly use 1 (references/autoinvest-plans.md Workflow step 6) |
| Plan not found | Query returns no matching plan | Inform: "No matching auto-invest plan found. You can create a new plan." (See Scenario 4) |
| MCP tool missing | Required tool not available in MCP service | Explain: "Auto-invest feature requires updated MCP service. Please ensure gate-mcp is properly configured." |
| API error (401/403) | Authentication failure | Guide: "Authentication error. Please check your API key permissions include Earn (auto-invest) access." See exchange-runtime-rules.md for auth handling. |
| API error (4xx/5xx) | Other API errors | Report error message and suggest retry or contact support |
| Missing required parameter | Tool schema requires param with no default | Do not guess. Ask user: "Please specify {parameter_name} (e.g., {example})." |
| Condition | Action | Tool(s) to Use |
|-----------|--------|----------------|
| User wants to create plan | Route to references/autoinvest-plans.md Scenario 1/2 | Validate (incl. plan_period_day) → cex_spot_get_spot_accounts (and cex_earn_list_user_uni_lends if earn fund source) → cex_earn_get_auto_invest_min_amount → cex_earn_list_auto_invest_config → Confirm → cex_earn_create_auto_invest_plan |
| User wants to update plan | Route to references/autoinvest-plans.md | cex_earn_list_auto_invest_plans (if no ID) → Confirm → cex_earn_update_auto_invest_plan |
| User wants to stop plan | Route to references/autoinvest-plans.md Scenario 9 | cex_earn_list_auto_invest_plans (if no ID) → Action Draft (end turn) → user's next message confirms → cex_earn_stop_auto_invest_plan |
| User wants to top-up (add position) | Route to references/autoinvest-plans.md Scenario 10 | cex_earn_list_auto_invest_plans (if no ID) → cex_earn_get_auto_invest_plan_detail (if no amount) → cex_spot_get_spot_accounts → Confirm → cex_earn_add_position_auto_invest_plan (ONCE ONLY) |
| User wants to list plans | Direct query | cex_earn_list_auto_invest_plans |
| User wants plan detail | Direct query | cex_earn_get_auto_invest_plan_detail |
| User asks "which coins?" | Scenario 1 | cex_earn_list_auto_invest_coins |
| User asks "minimum amount?" | Scenario 2 | cex_earn_get_auto_invest_min_amount |
| User asks "execution history?" | Scenario 3 | cex_earn_list_auto_invest_plan_records |
| User asks "order details?" | Direct query | cex_earn_list_auto_invest_orders |
| User asks about investment currency restrictions | Route to references/autoinvest-compliance.md | Explain USDT/BTC only rule |
| User asks about fund source | Route to references/autoinvest-compliance.md | Explain spot vs earn options |
| Plan not found in query | Scenario 4 | Inform user, offer to create new plan |
| Insufficient balance | Error Handling | Show shortfall, do not proceed |
| Invalid parameters | Error Handling | Validate against Business Rules, reject with explanation |
✅ Auto-invest plan created
- Invest currency: {USDT|BTC}
- Amount per period: {amount}
- Cadence: {cadence description}
- Target(s): {target coin(s) with ratios if multi-target}
- Fund source: {spot|earn}
- Fund flow: {auto_invest|earn} (spot account|Simple Earn)
✅ Auto-invest plan updated
- Plan: {id or name}
- Updated: {changed fields and new values}
✅ Auto-invest plan stopped
- Plan: {id or name}
- Status: Automatic deductions ceased
- Note: Purchased assets remain in {account type}
✅ Top-up executed
- Plan: {id or name}
- Amount: {amount} {invest_currency}
- Target allocation: {per Business Rules}
📋 Your Auto-Invest Plans
{For each plan:}
**Plan {N}: {plan_name}**
- Investment: {amount} {currency} per {cadence}
- Target(s): {coin(s)}
- Execution count: {period} times
- Status: Active
{If no plans:}
You have no active auto-invest plans. Create one to start DCA investing.
📋 Supported Auto-Invest Coins
{List coins returned by cex_earn_list_auto_invest_coins}
You can use any of these coins as targets in your auto-invest plan.
📋 Minimum Investment Amount
- Investment currency: {USDT|BTC}
- Target(s): {coin(s)}
- Minimum per period: {min_amount} {currency}
❌ {Error type}
{Explanation of what went wrong}
{Actionable suggestion to resolve}
| Document | Content |
|----------|---------|
| references/scenarios.md | Comprehensive scenario index covering all 16 scenarios (plan lifecycle, queries, compliance) |
| references/autoinvest-plans.md | Plan lifecycle operations and scenarios (create, update, stop, top-up) |
| references/autoinvest-compliance.md | Compliance rules and restrictions (investment currency, region, funding) |
tools
Exchange listing tracker. Use this skill whenever the user asks about exchange listing, delisting, or maintenance announcements. Trigger phrases include: any new coins listed recently, what did Binance list, new listings, delisted. MCP tools: news_feed_get_exchange_announcements, info_coin_get_coin_info, info_marketsnapshot_get_market_snapshot.
testing
Event attribution and explanation. Use this skill ONLY when the user's query is exclusively about the reason behind a price move with no other analysis dimensions. Trigger phrases: why did X crash, what just happened, why is it pumping, what caused. If the query ALSO mentions fundamentals, risk check, technicals, or any other analysis dimension, use gate-info-research instead — it handles multi-dimension queries in a single unified report.
tools
Community sentiment via Gate-News MCP, X/Twitter-first. Use for social discussion, KOL takes, or opinion on a coin or topic. Triggers: what does the community think about ETH, Twitter or X sentiment, what are people saying, KOL opinions. Reddit, Discord, Telegram when search_ugc is available; until then label output as X/Twitter-only. Tools: news_feed_search_x, news_feed_get_social_sentiment.
testing
News briefing. Use this skill ONLY when the user's query is exclusively about recent news or headlines with no other analysis dimensions. Trigger phrases: what happened recently, today's highlights, crypto news, any new updates. If the query ALSO mentions coin analysis, risk check, technicals, or any other analysis dimension, use gate-info-research instead — it handles multi-dimension queries in a single unified report.