Gate dual investment skill. Use when the user asks about dual currency products, target price settlement, or placing dual orders...
gate-cli (binary path)Resolve gate-cli in order: (1) command -v gate-cli and gate-cli --version succeeds; (2) ${HOME}/.local/bin/gate-cli if executable; (3) ${HOME}/.openclaw/skills/bin/gate-cli if executable. Canonical rules: exchange-runtime-rules.md ยง4 (or gate-runtime-rules.md ยง4).
โ ๏ธ 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
gate-cli commands explicitly listed in this skill. Commands not documented here must NOT be run for these workflows, even if other interfaces expose them.Query Operations (Read-only)
gate-cli cex earn dual balancegate-cli cex earn dual plansgate-cli cex earn dual ordersExecution Operations (Write)
gate-cli cex earn dual placeGATE_API_KEY and GATE_API_SECRET are not both set on the host, run gate-cli config init to complete the wizard for API key, secret, profiles, and defaults (see gate-cli).gate-cli config init is not required when credentials are already supplied โ e.g. both GATE_API_KEY and GATE_API_SECRET set on the host, or --api-key / --api-secret where supported โ never ask the user to paste secrets into chat.gate-cli (run sh ./setup.sh from this skill directory if missing; optional GATE_CLI_SETUP_MODE=release).$HOME/.openclaw/skills/bin to PATH if you invoke gate-cli by name (or the directory where setup.sh installs it).GATE_API_KEY and GATE_API_SECRET are both set (non-empty) for the host, do not require gate-cli config init โ that is equivalent valid config for gate-cli. When both are unset or empty, remind the operator to run gate-cli config init or to configure GATE_API_KEY / GATE_API_SECRET in the matching skill from the skill library (never ask the user to paste secrets into chat).gate-cli --version or a read-only gate-cli cex ... command from this skill); confirm credentials resolve before mutating operations.Read and strictly follow references/gate-cli.md, then execute this skill's dual-investment workflow.
SKILL.md keeps routing and product semantics.references/gate-cli.md is the authoritative gate-cli execution contract for plan lookup, confirmation-gated placement, and order verification.| Tool | Auth | Description |
|---|---|---|
gate-cli cex earn dual plans |
Yes | List available dual investment plans (optional param: plan_id) |
gate-cli cex earn dual orders |
Yes | List dual investment orders. page and limit are required: always pass page=1, limit=100. Optional: from, to. MUST loop all pages (increment page until returned rows < limit) before drawing any conclusion. |
gate-cli cex earn dual balance |
Yes | Get dual investment balance & interest stats |
gate-cli cex earn dual place |
Yes | Place a dual investment order. Params: plan_id (required), amount (required), text (optional, must start with t-, max 28 bytes after prefix, alphanumeric/_/-/. only). |
| Case | User Intent | Signal Keywords | Action |
|---|---|---|---|
| 1 | Browse dual product list | "dual products", "sell-high / buy-low options" | See references/product-query.md |
| 3 | Product details | "min investment", "BTC sell-high" | See references/product-query.md (filter locally by currency; show matching plans, skip min amount) |
| 4 | Settlement simulation | "what happens at delivery", "if price reaches X" | See references/product-query.md (simulation) |
| 5 | Position summary (ongoing) | "how much locked", "active positions" | See references/product-query.md (ongoing + balance) |
| 6 | Settlement records | "settlement records", "got crypto or USDT", "last month orders" | See references/product-query.md (settled) |
| 7 | Sell-high order (invest crypto) | "sell high for me", "sell high with BTC", "sell high order" | See references/subscription.md |
| 8 | Buy-low order (invest stablecoin) | "buy low for me", "buy low BTC with USDT", "buy low order" | See references/subscription.md |
| 9 | Amount eligibility for order | "can I buy", "is 5000U enough" | See references/subscription.md |
| 10 | Min purchase check for order | "minimum to buy", "can I buy dual with 50U" | See references/subscription.md |
| 11 | Settlement result query | "what did I receive", "settlement result" | See references/settlement-assets.md (settlement) |
| 12 | Dual asset briefing | "dual balance", "total locked" | See references/settlement-assets.md (balance) |
| 13 | Currency conversion risk | "will I lose principal", "risk", "principal-protected?" | Domain Knowledge (no API) |
| 14 | Missed gains explanation | "did I lose money", "missed gains", "price surged" | Domain Knowledge (no API) |
| 15 | Restricted region | "can I buy dual in [region]", "which regions supported" | See references/subscription.md (compliance) |
| 17 | Compliance check failure | "subscription failed", "compliance check not passed" | See references/subscription.md (compliance) |
references/ and follow the Workflow.references/subscription.md and follow the order placement Workflow.references/subscription.md and follow the compliance handling Workflow. These cases are triggered by gate-cli cex earn dual place error responses or by the user asking about region restrictions.gate-cli cex earn dual orders has NO type field. Derive from invest_currency: crypto (BTC, ETH...) โ Sell High (Call); stablecoin (USDT) โ Buy Low (Put). Filter by coin using invest_currency or exercise_currency โ there is NO instrument_name.INIT (Pending), PROCESSING (In Position), SETTLEMENT_SUCCESS (Settled), SETTLEMENT_PROCESSING (Settling), CANCELED (Canceled), FAILED (Failed), REFUND_SUCCESS / REFUND_PROCESSING / REFUND_FAILED โ display as "Early Redemption", never "Refund". Early-redeemed orders have zero yield.Sell High: Invest 1 BTC, target price 20,000 USDT, 31 days, 100% APY
Buy Low: Invest 20,000 USDT, target price 20,000 USDT, 31 days, 100% APY
Q: Will I lose principal? (Case 13) A: Interest-guaranteed, not principal-protected. You always receive principal + interest, but the settlement currency may change. Sell-high may return crypto instead of USDT; buy-low may return USDT instead of crypto. The closer the target price to the current price, the higher the yield but also the higher the conversion risk.
Q: I sold high on BTC and it surged โ did I lose money? (Case 14) A: When settlement price โฅ target price, you successfully sell at the target price and receive USDT, but miss gains above the target price. When settlement price < target price, you get back crypto + interest. This product suits sideways or mildly bullish markets; in strong bull markets you may "miss out" on excess gains.
delivery_time, create_time, complete_time, delivery_timest) are Unix timestamps (seconds). Do NOT convert them to dates or display them to the user in any form. This includes: (1) Do NOT show timestamps as table columns. (2) Do NOT convert timestamps to dates and use them as section headers or grouping labels (e.g. "Delivery Time: 2026-03-17"). (3) Do NOT mention delivery dates in order confirmations. Simply omit all time-related information from user-facing output.apy, apy_display, apy_settlement, apyDisplay, or any other rate field) returned by any dual investment tool is a raw value โ NOT a percentage. You MUST multiply by 100 then append % for display. NEVER display the raw value directly as a percentage. Common mistake: values like 1.1343 or 16.133 look like percentages but they are NOT โ 1.1343 โ 113.43%, 16.133 โ 1613.3%. Another example: 0.0619 โ 6.19%, 2.7814 โ 278.14%. Use the raw value only in settlement formulas. This rule applies to ALL dual tools (gate-cli cex earn dual plans, gate-cli cex earn dual orders, gate-cli cex earn dual balance, etc.).19.9378, the correct display is 1993.78% โ NOT 19.94%.gate-cli cex earn dual place, MUST show the user the full order details (plan, amount, target price, APY, settlement scenarios) and get explicit user confirmation. NEVER place an order without confirmation.| Condition | Response |
|---|---|
| Auth endpoint returns "not login" | "Please log in to your Gate account first." |
gate-cli cex earn dual plans returns empty |
"No dual investment plans available at the moment." |
gate-cli cex earn dual orders returns empty |
"No dual investment orders found for the specified criteria." |
gate-cli cex earn dual place returns region restriction error |
See Case 15 in references/subscription.md |
gate-cli cex earn dual place returns other compliance error |
See Case 17 in references/subscription.md |
gate-cli cex earn dual place returns insufficient balance |
"Insufficient balance. Please ensure your account has enough funds and try again." |
gate-cli cex earn dual place returns other failure |
Display the error message returned by the API to the user. |
See references/scenarios.md for full prompt examples and expected behaviors covering all 17 cases.