{
  "markdown": "# crypto-agent-trading\n\nAgent skills for trading cryptocurrency via the Crypto.com APIs. Works with any SKILL.md-compatible agent platform (OpenClaw, Cursor, Claude Code, and others).\n\nThis repository contains two independent skills:\n\n| Skill | Directory | Description |\n|-------|-----------|-------------|\n| **Main App** | `crypto-com-app/` | Execute trading, check balances, token prices via Crypto.com App |\n| **Exchange** | `crypto-com-exchange/` | Execute trading, check balances, token prices via Crypto.com Exchange |\n\nEach skill has its own `SKILL.md` and references. Install one or both depending on your use case.\n\n---\n\n## Main App Skill\n\n### Features\n\n- **Trade**: Market buy, sell, swap, and exchange across 200+ tokens (BTC, ETH, CRO, and more)\n- **Balances**: Query fiat and crypto portfolio holdings\n- **Prices**: Discover coins and check market prices\n- **History**: View recent transaction history\n- **Trading Limits**: Check weekly trading budget usage\n- **Kill Switch**: Emergency API key revocation\n- **Cash Management**: Deposit and withdraw fiat currencies, view bank accounts, check payment networks, and email deposit instructions\n\n### Quickstart\n\n#### 1. Set environment variables\n\nFirst, generate an API key following the [API Key Management](https://help.crypto.com/en/articles/13843786-api-key-management) guide. Then export the key and secret in your terminal:\n\n```bash\nexport CDC_API_KEY=\"your-api-key\"\nexport CDC_API_SECRET=\"your-api-secret\"\n```\n\n#### 2. Install the skill\n\n```bash\nnpx skills add crypto-com/crypto-agent-trading/crypto-com-app -g -y\n```\n\nOr manually copy the skill folder to your agent platform's skill directory:\n\n| Platform | Install location | Activation |\n|----------|-----------------|------------|\n| **OpenClaw** | `~/.openclaw/skills/crypto-com-app/` | Say \"Initialize the crypto-com-app skill\" |\n| **Cursor** | `~/.cursor/skills/crypto-com-app/` | Add as an agent skill in settings |\n| **Claude Code** | `~/.claude/skills/crypto-com-app/` | Point Claude at the `SKILL.md` path |\n| **Other agents** | Any local directory | Point your agent at `SKILL.md` |\n\nThe skill uses **relative script paths** (`./scripts/...` from the skill root), so it works from any install location without path modifications.\n\n### Example Conversation\n\n```\nUser: \"Buy CRO with 100 USD\"\nAgent: (runs quote) \"Confirm: buy 1,250 CRO for 100 USD? This quote expires in 15 seconds.\"\nUser: \"Yes\"\nAgent: (runs confirm) \"Done! Purchased 1,250 CRO for 100 USD.\"\n```\n\n```\nUser: \"What's my balance?\"\nAgent: (runs balance check) \"You hold 1,250 CRO ($105.00) and 400.00 USD.\"\n```\n\n```\nUser: \"Swap 500 CRO to BTC\"\nAgent: (runs quote) \"Confirm: swap 500 CRO for 0.00045 BTC? Expires in 15 seconds.\"\nUser: \"No, make it 200 CRO instead\"\nAgent: (runs new quote) \"Confirm: swap 200 CRO for 0.00018 BTC? Expires in 15 seconds.\"\nUser: \"Confirm\"\nAgent: (runs confirm) \"Done! Swapped 200 CRO for 0.00018 BTC.\"\n```\n\n### Skill Workflows\n\nThe skills work together in typical trading flows:\n\n**Basic Trading**: Check balance (crypto-com-app) → Get quote (crypto-com-app) → Confirm trade (crypto-com-app)\n\n**Portfolio Review**: View balances (crypto-com-app) → Check history (crypto-com-app) → Analyze limits (crypto-com-app)\n\n### Main App File Structure\n\n```\ncrypto-com-app/\n├── _meta.json          # OpenClaw package metadata\n├── SKILL.md            # Core skill: configs, commands, business logic\n├── CHANGELOG.md        # Version history\n├── references/\n│   └── errors.md       # Detailed error scenarios + recovery\n└── scripts/\n    ├── lib/\n    │   ├── api.ts      # HTTP client, HMAC signing\n    │   └── output.ts   # Structured output + error codes\n    ├── account.ts      # Balances, trading limit, kill switch\n    ├── coins.ts        # Coin discovery\n    ├── fiat.ts         # Cash deposits, withdrawals, bank accounts\n    └── trade.ts        # Quotations, orders, history\n```\n\n### Prerequisites\n\n- Node.js 18+ (for `npx tsx` and built-in `fetch`)\n- A Crypto.com App account with API key and secret\n\n### Main App Security\n\n- **No withdrawal permissions** -- the API key can only trade; it cannot withdraw funds from your account\n- **Weekly trading limit** -- a configurable cap on total trading volume acts as a financial guardrail against runaway spending\n- **HMAC-SHA256 signing** -- all requests are signed to prevent tampering and replay attacks\n- **Environment-only credentials** -- API keys are read from environment variables only and never stored in files\n- **Kill switch** -- instantly revoke API access in emergencies to stop all further trading\n\n---\n\n## Exchange Spot Skill\n\n### Features\n\n- **Spot Orders**: Place, amend, and cancel LIMIT and MARKET orders\n- **Advanced Orders**: STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT\n- **Order Groups**: Manage OCO, OTO, and OTOCO order groups\n- **Balances & Positions**: Query balances, positions, order history, and trade history\n- **Withdrawals**: Withdraw funds and check deposit/withdrawal status\n- **Market Data**: Tickers, order book, candlesticks, and trades\n\n### Setup\n\n1. Copy the `crypto-com-exchange/` skill folder into your agent platform's skill directory\n2. Provide your Crypto.com Exchange API key and secret\n3. The agent reads the `SKILL.md` and handles authentication, signing, and request formatting directly — no scripts or runtime dependencies required\n\n#### Getting API Keys\n\n1. Log in to [Crypto.com Exchange](https://crypto.com/exchange)\n2. Go to **Settings → API Keys**\n3. Create a new key with desired permissions (Spot Trading, Withdrawal, etc.)\n4. Set IP whitelist for production use\n5. Store the API key and secret securely\n\n### Example Conversation\n\n```\nUser: \"Place a limit buy for 0.1 BTC at $93,000\"\nAgent: \"Confirm: LIMIT BUY 0.1 BTC_USD @ $93,000?\"\nUser: \"CONFIRM\"\nAgent: \"Done! Order placed — order ID 6530219599901000701.\"\n```\n\n```\nUser: \"Set up an OCO on BTC — sell limit at $108,000, stop-loss at $80,000, 0.1 BTC each\"\nAgent: \"Confirm: OCO on BTC_USD — SELL LIMIT @ $108,000 + SELL STOP_LOSS trigger @ $80,000, 0.1 BTC per leg?\"\nUser: \"CONFIRM\"\nAgent: \"Done! OCO created — list ID 6498090546073120100.\"\n```\n\n```\nUser: \"What are my balances?\"\nAgent: \"You hold 1.25 BTC, 5,000 USDT, and 10,000 CRO on your Exchange account.\"\n```\n\n### Environments\n\n| Environment | Base URL |\n|-------------|----------|\n| Production | `https://api.crypto.com/exchange/v1/` |\n| UAT Sandbox | `https://uat-api.3ona.co/exchange/v1/` |\n\nUAT Sandbox requires separate credentials (institutional access only).\n\n### Coverage\n\n- **52 endpoints** — public market data, private trading, advanced orders, wallet, account management\n- **Production-tested** — every endpoint verified against live API with real orders\n- **66 edge cases documented** — param types, pagination quirks, error codes, validation rules\n\n### Rate Limits\n\n| Endpoint | Limit |\n|----------|-------|\n| `create-order`, `cancel-order`, `cancel-all-orders` | 15 req / 100ms each |\n| `get-order-detail` | 30 req / 100ms |\n| `get-trades`, `get-order-history` | 1 req / second |\n| Other private endpoints | 3 req / 100ms each |\n| Public market data | 100 req / second (per IP) |\n\nMax open orders: 200 per trading pair, 1,000 across all pairs (per account/subaccount).\n\n### Key Things Your Agent Should Know\n\n- Order params (`price`, `quantity`, `notional`, `ref_price`, `amount`) must be **strings**\n- `limit` must be a **number** (not string)\n- Instrument names are case-sensitive: `BTC_USD` not `btc_usd`\n- Public endpoints = GET only, Private endpoints = POST only\n- All private requests use JSON body with HMAC-SHA256 signature\n\nSee the Exchange `SKILL.md` for the full reference.\n\n### Exchange File Structure\n\n```\ncrypto-com-exchange/\n├── SKILL.md                      # Full skill definition — 52 endpoints, parameters, edge cases, agent behavior\n├── references/\n│   └── authentication.md         # HMAC-SHA256 signing implementation (Python, JavaScript, Bash), error codes\n└── LICENSE.md                    # MIT License\n```\n\n### Exchange Security\n\n- **HMAC-SHA256 signing** -- all private requests are signed to prevent tampering and replay attacks\n- **Production confirmation** -- the agent requires explicit user confirmation (typing \"CONFIRM\") before executing any production trade\n- **Credential masking** -- API keys and secrets are never displayed in full; only partial characters are shown\n- **IP whitelisting** -- API keys can be restricted to specific IP addresses for production use\n- **Withdrawal whitelisting** -- withdrawal destination addresses must be pre-approved in your Exchange account settings\n\n---\n\n## FAQ & Resources\n\n- [OpenClaw Integration with Agent Key](https://help.crypto.com/en/collections/18662855-openclaw-integration-with-agent-key)\n- [OpenClaw Trading Overview](https://help.crypto.com/en/articles/13843765-openclaw-trading-overview)\n- [Getting Started](https://help.crypto.com/en/articles/13843782-getting-started)\n- [API Key Management](https://help.crypto.com/en/articles/13843786-api-key-management)\n- [Trading with OpenClaw](https://help.crypto.com/en/articles/13843788-trading-with-openclaw)\n- [Weekly Trading Limit](https://help.crypto.com/en/articles/13843797-weekly-trading-limit)\n- [Safety and Security](https://help.crypto.com/en/articles/13843804-safety-and-security)\n- [Notifications](https://help.crypto.com/en/articles/13843811-notifications)\n\n## License\n\n- **Main App Skill**: Apache License 2.0\n- **Exchange Spot Skill**: MIT License\n",
  "bytes": 9441,
  "sha": "65c51eabc445fc3d182fc76023796cf85970282152c87dc8a71cf92b3c3c7cfe",
  "repo_slug": "crypto-com/crypto-agent-trading",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_crypto_com_crypto_agent_trading_crypto_c_ade0897f/readme"
}