| name | ccxt-trade |
| description | Validate, place, and cancel exchange orders through CCXT. Use only for explicit user-requested trading actions. |
Use this skill only when user explicitly asks to trade.
Rules:
- Validate input before execution.
- Use
exchange field directly.
- Respect account risk guards (set during
account_add_api).
- For side effects, review preview details before execution.
create_order, cancel_order, and set_leverage require options.confirm=true to proceed.
- When credentials are missing, use
ccxt-admin.account_add_api exchange=<X> payload={alias:<A>,apiKey:<K>,secret:<S>} runtimeContext={password:<MASTER_PASSWORD>} onboarding.
- Do not suggest environment-variable credential setup.
Confirmation Requirement
create_order, cancel_order, and set_leverage require explicit confirmation:
- Set
options.confirm=true in the request, or
- The call returns
CONFIRMATION_REQUIRED with a details.preview object.
Always confirm with the user before setting confirm=true.
details.preview is a preflight preview from request fields. Exchange precision and market limits are enforced during execution.
Prompting for API Keys
When the action fails with NO_API_ACCOUNT:
- Use
../references/exchange-onboarding.md for exchange-specific API page and requirements.
- Ask user to create API key/secret in exchange API management.
- Remind user trading permissions must be enabled for write actions.
- Guide user to add credentials via
account_add_api first.
- Remind user that
account_add_api stores credentials locally before live trade actions are retried.
If user already has credentials:
- do not suggest onboarding again
- retry the requested trade flow directly
When response code is ACCOUNT_LOCKED:
- ask for master password only
- do not ask for API key/secret again
- retry the same trade command with password context
AUTH_ERROR handling
When request fails with AUTH_ERROR:
- Ask user to verify key validity and trade permission scope.
- If key is stale/invalid, guide key rotation and re-run
account_add_api.
- If credentials already valid, retry the trade request (no repeated onboarding).