Install
openclaw skills install gate-exchange-subaccountGate Exchange sub-account management skill. Use when the user asks to manage, create, lock, unlock, or list their sub-accounts. Triggers on 'sub-account status', 'create sub-account', 'lock sub-account', 'my sub-accounts'.
openclaw skills install gate-exchange-subaccount⚠️ 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 Server | Status |
|---|---|
| Gate (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 sub-account workflow.
SKILL.md keeps intent routing and permission boundaries.references/mcp.md is the authoritative MCP execution layer for create/lock/unlock confirmation gates and status verification.| Tool | Auth | Description |
|---|---|---|
cex_sa_get_sa | Yes | Get details of a specific sub-account by user ID |
cex_sa_list_sas | Yes | List all sub-accounts under the main account |
cex_sa_create_sa | Yes | Create a new normal sub-account |
cex_sa_lock_sa | Yes | Lock a sub-account to disable login and trading |
cex_sa_unlock_sa | Yes | Unlock a previously locked sub-account |
Parse the user's message to determine which sub-account operation they need.
Key data to extract:
intent: One of query_status, list_all, create, lock, unlockuser_id: Sub-account UID (required for query_status, lock, unlock)login_name: Desired username (for create, may need to ask user)Intent detection rules:
| Signal Keywords | Intent |
|---|---|
| "status of sub-account", "sub-account UID {id}", "check sub-account" | query_status |
| "all sub-accounts", "list sub-accounts", "my sub-accounts", "which sub-accounts" | list_all |
| "create sub-account", "new sub-account", "add sub-account" | create |
| "lock sub-account", "disable sub-account", "freeze sub-account" | lock |
| "unlock sub-account", "enable sub-account", "unfreeze sub-account" | unlock |
query_status)Call cex_sa_get_sa with:
user_id: The sub-account UID provided by the userKey data to extract:
login_name: Sub-account usernameremark: Sub-account remark/notestate: Account state (normal / locked)type: Account type (normal / pool)create_time: Account creation timestampPresent the sub-account details in a structured format.
list_all)Call cex_sa_list_sas with:
type: "0" (normal sub-accounts only)Key data to extract:
user_id, login_name, remark, state, create_timePresent results as a table with username, UID, remark (if any), and current status.
create)Pre-check: Call cex_sa_list_sas with type: "0" to get the current list of normal sub-accounts. Check if the user can still create more sub-accounts based on the returned count.
If creation is available:
cex_sa_create_sa with:
login_name: User-provided login name (required)email: User-provided email (optional)remark: User-provided remark (optional)Key data to extract:
user_id: Newly created sub-account UIDlogin_name: Confirmed usernamestate: Should be "normal"Important: Only normal sub-accounts can be created through this skill.
lock)user_id is provided; if not, ask the usercex_sa_get_sa with user_id to verify the sub-account exists and belongs to the main accountcex_sa_lock_sa with:
user_id: The sub-account UIDKey data to extract:
unlock)user_id is provided; if not, ask the usercex_sa_get_sa with user_id to verify the sub-account exists and is currently lockedcex_sa_unlock_sa with:
user_id: The sub-account UIDKey data to extract:
Present results using the Report Template below. Always include relevant context and next-step suggestions.
| Condition | Action |
|---|---|
| User asks for a specific sub-account status with UID | Route to Case A: query_status |
| User asks to see all sub-accounts | Route to Case B: list_all |
| User wants to create a new sub-account | Route to Case C: create |
| User wants to lock a sub-account with UID | Route to Case D: lock |
| User wants to unlock a sub-account with UID | Route to Case E: unlock |
| UID not provided for operations requiring it | Ask user for the sub-account UID |
| Login name not provided for creation | Ask user for a login name |
| Sub-account already in target state (lock/unlock) | Inform user, no action needed |
| API returns authentication error | Prompt user to log in |
| API returns permission error | Inform user that main account privileges are required |
| Sub-account does not exist or does not belong to user | Inform user the UID is invalid |
Sub-Account Details
---
Username: {login_name}
UID: {user_id}
Status: {state}
Type: {type}
Remark: {remark or "N/A"}
Created: {create_time}
Your Sub-Accounts
---
| # | Username | UID | Status | Remark |
|---|----------|-----|--------|--------|
| 1 | {login_name} | {user_id} | {state} | {remark or "-"} |
| 2 | ... | ... | ... | ... |
Total: {count} sub-account(s)
Sub-Account Created Successfully
---
Username: {login_name}
UID: {user_id}
Status: Normal
Remark: {remark or "N/A"}
Note: Only normal sub-accounts can be created through this interface.
Sub-Account {Action} Successfully
---
Username: {login_name}
UID: {user_id}
Previous Status: {previous_state}
Current Status: {new_state}
cex_sa_create_sa, cex_sa_lock_sa, cex_sa_unlock_sa): Always require explicit user confirmation before execution. Never auto-execute.| Condition | Response |
|---|---|
| Auth endpoint returns "not login" | "Please log in to your Gate account first." |
| User is not a main account | "Sub-account management requires main account privileges. Please switch to your main account." |
| Sub-account UID not found | "Sub-account with UID {user_id} was not found. Please verify the UID and try again." |
| Sub-account does not belong to user | "This sub-account does not belong to your main account." |
| Sub-account already locked | "Sub-account {user_id} is already locked. No action needed." |
| Sub-account already unlocked | "Sub-account {user_id} is already in normal (unlocked) state. No action needed." |
| Create sub-account fails (limit reached) | "You have reached the maximum number of sub-accounts. Please contact support if you need more." |
| Create sub-account fails (duplicate name) | "The login name '{login_name}' is already taken. Please choose a different name." |
| Unknown error | "An error occurred while processing your request. Please try again later." |
See scenarios.md for full prompt examples and expected behaviors.