Agent skill for trading crypto via the Crypto.com API. Buy, sell, swap, and query balances
npx skills add https://github.com/crypto-com/crypto-agent-trading --skill crypto-com-appقم بتثبيت هذه المهارة باستخدام واجهة سطر الأوامر (CLI) وابدأ في استخدام سير عمل SKILL.md في مساحة عملك.
Agent skills for trading cryptocurrency via the Crypto.com APIs. Works with any SKILL.md-compatible agent platform (OpenClaw, Cursor, Claude Code, and others).
This repository contains two independent skills:
| Skill | Directory | Description |
|---|---|---|
| Main App | crypto-com-app/ |
Execute trading, check balances, token prices via Crypto.com App |
| Exchange | crypto-com-exchange/ |
Execute trading, check balances, token prices via Crypto.com Exchange |
Each skill has its own SKILL.md and references. Install one or both depending on your use case.
First, generate an API key following the API Key Management guide. Then export the key and secret in your terminal:
export CDC_API_KEY="your-api-key"
export CDC_API_SECRET="your-api-secret"
npx skills add crypto-com/crypto-agent-trading/crypto-com-app -g -y
Or manually copy the skill folder to your agent platform's skill directory:
| Platform | Install location | Activation |
|---|---|---|
| OpenClaw | ~/.openclaw/skills/crypto-com-app/ |
Say "Initialize the crypto-com-app skill" |
| Cursor | ~/.cursor/skills/crypto-com-app/ |
Add as an agent skill in settings |
| Claude Code | ~/.claude/skills/crypto-com-app/ |
Point Claude at the SKILL.md path |
| Other agents | Any local directory | Point your agent at SKILL.md |
The skill uses relative script paths (./scripts/... from the skill root), so it works from any install location without path modifications.
User: "Buy CRO with 100 USD"
Agent: (runs quote) "Confirm: buy 1,250 CRO for 100 USD? This quote expires in 15 seconds."
User: "Yes"
Agent: (runs confirm) "Done! Purchased 1,250 CRO for 100 USD."
User: "What's my balance?"
Agent: (runs balance check) "You hold 1,250 CRO ($105.00) and 400.00 USD."
User: "Swap 500 CRO to BTC"
Agent: (runs quote) "Confirm: swap 500 CRO for 0.00045 BTC? Expires in 15 seconds."
User: "No, make it 200 CRO instead"
Agent: (runs new quote) "Confirm: swap 200 CRO for 0.00018 BTC? Expires in 15 seconds."
User: "Confirm"
Agent: (runs confirm) "Done! Swapped 200 CRO for 0.00018 BTC."
The skills work together in typical trading flows:
Basic Trading: Check balance (crypto-com-app) → Get quote (crypto-com-app) → Confirm trade (crypto-com-app)
Portfolio Review: View balances (crypto-com-app) → Check history (crypto-com-app) → Analyze limits (crypto-com-app)
crypto-com-app/
├── _meta.json # OpenClaw package metadata
├── SKILL.md # Core skill: configs, commands, business logic
├── CHANGELOG.md # Version history
├── references/
│ └── errors.md # Detailed error scenarios + recovery
└── scripts/
├── lib/
│ ├── api.ts # HTTP client, HMAC signing
│ └── output.ts # Structured output + error codes
├── account.ts # Balances, trading limit, kill switch
├── coins.ts # Coin discovery
├── fiat.ts # Cash deposits, withdrawals, bank accounts
└── trade.ts # Quotations, orders, history
npx tsx and built-in fetch)crypto-com-exchange/ skill folder into your agent platform's skill directorySKILL.md and handles authentication, signing, and request formatting directly — no scripts or runtime dependencies requiredUser: "Place a limit buy for 0.1 BTC at $93,000"
Agent: "Confirm: LIMIT BUY 0.1 BTC_USD @ $93,000?"
User: "CONFIRM"
Agent: "Done! Order placed — order ID 6530219599901000701."
User: "Set up an OCO on BTC — sell limit at $108,000, stop-loss at $80,000, 0.1 BTC each"
Agent: "Confirm: OCO on BTC_USD — SELL LIMIT @ $108,000 + SELL STOP_LOSS trigger @ $80,000, 0.1 BTC per leg?"
User: "CONFIRM"
Agent: "Done! OCO created — list ID 6498090546073120100."
User: "What are my balances?"
Agent: "You hold 1.25 BTC, 5,000 USDT, and 10,000 CRO on your Exchange account."
| Environment | Base URL |
|---|---|
| Production | https://api.crypto.com/exchange/v1/ |
| UAT Sandbox | https://uat-api.3ona.co/exchange/v1/ |
UAT Sandbox requires separate credentials (institutional access only).
| Endpoint | Limit |
|---|---|
create-order, cancel-order, cancel-all-orders |
15 req / 100ms each |
get-order-detail |
30 req / 100ms |
get-trades, get-order-history |
1 req / second |
| Other private endpoints | 3 req / 100ms each |
| Public market data | 100 req / second (per IP) |
Max open orders: 200 per trading pair, 1,000 across all pairs (per account/subaccount).
price, quantity, notional, ref_price, amount) must be stringslimit must be a number (not string)BTC_USD not btc_usdSee the Exchange SKILL.md for the full reference.
crypto-com-exchange/
├── SKILL.md # Full skill definition — 52 endpoints, parameters, edge cases, agent behavior
├── references/
│ └── authentication.md # HMAC-SHA256 signing implementation (Python, JavaScript, Bash), error codes
└── LICENSE.md # MIT License