{"skill":{"slug":"coinbase-openapi-skill","displayName":"Coinbase OpenAPI Skill","summary":"Operate Coinbase Advanced Trade REST APIs through UXC with a curated OpenAPI schema, products-first discovery, and explicit JWT bearer auth guidance.","description":"---\nname: coinbase-openapi-skill\ndescription: Operate Coinbase Advanced Trade REST APIs through UXC with a curated OpenAPI schema, products-first discovery, and explicit JWT bearer auth guidance.\n---\n\n# Coinbase Advanced Trade Skill\n\nUse this skill to run Coinbase Advanced Trade REST operations through `uxc` + OpenAPI.\n\nReuse the `uxc` skill for shared execution, auth, and error-handling guidance.\n\n## Prerequisites\n\n- `uxc` is installed and available in `PATH`.\n- Network access to `https://api.coinbase.com`.\n- Access to the curated OpenAPI schema URL:\n  - `https://raw.githubusercontent.com/holon-run/uxc/main/skills/coinbase-openapi-skill/references/coinbase-advanced-trade.openapi.json`\n\n## Scope\n\nThis skill covers a curated Coinbase Advanced Trade surface for:\n\n- product and best-bid-ask market reads\n- account summary reads\n- order create, cancel, and lookup workflows\n\nThis skill does **not** cover:\n\n- Coinbase Exchange APIs\n- Coinbase Prime APIs\n- Coinbase Derivatives APIs\n- wallet or retail app product families outside Advanced Trade\n\n## Authentication\n\nPublic product endpoints can be read without credentials.\n\nPrivate account and order endpoints require a Coinbase Advanced Trade bearer JWT. `uxc` now supports Coinbase's request-scoped JWT flow directly through `jwt_bearer_v1`, so you can store the API key id and private key in a credential and let `uxc` mint the short-lived bearer token per request.\n\nRecommended v1 setup:\n\n1. Download or copy the Coinbase API key material:\n   - `key_id`: `organizations/{org_id}/apiKeys/{key_id}`\n   - `private_key`: Coinbase exports either `-----BEGIN EC PRIVATE KEY-----` or `-----BEGIN PRIVATE KEY-----`; `uxc` accepts both PEM forms for ES256.\n2. Store those values in a local credential.\n3. Bind the credential to `api.coinbase.com` with a `jwt_bearer_v1` signer.\n\n```bash\nuxc auth credential set coinbase-advanced-trade \\\n  --auth-type api_key \\\n  --field key_id=env:COINBASE_KEY_ID \\\n  --field private_key=env:COINBASE_PRIVATE_KEY\n\nuxc auth binding add \\\n  --id coinbase-advanced-trade \\\n  --host api.coinbase.com \\\n  --path-prefix /api/v3/brokerage \\\n  --scheme https \\\n  --credential coinbase-advanced-trade \\\n  --signer-json '{\"kind\":\"jwt_bearer_v1\",\"algorithm\":\"es256\",\"private_key_field\":\"private_key\",\"header_typ\":\"JWT\",\"header_kid_field\":\"key_id\",\"expires_in_seconds\":120,\"claims\":{\"static\":{\"iss\":\"cdp\"},\"from_fields\":{\"sub\":\"key_id\"},\"time\":{\"nbf\":\"now\",\"exp\":\"now_plus_ttl\"}},\"request_claim\":{\"name\":\"uri\",\"format\":\"string\",\"value_template\":\"{{request.method}} {{request.host}}{{request.path}}\"}}' \\\n  --priority 100\n```\n\nValidate the active mapping when auth looks wrong:\n\n```bash\nuxc auth binding match https://api.coinbase.com/api/v3/brokerage/accounts\n```\n\n## Core Workflow\n\n1. Use the fixed link command by default:\n   - `command -v coinbase-openapi-cli`\n   - If missing, create it:\n     `uxc link coinbase-openapi-cli https://api.coinbase.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/coinbase-openapi-skill/references/coinbase-advanced-trade.openapi.json`\n   - `coinbase-openapi-cli -h`\n\n2. Inspect operation help before execution:\n   - `coinbase-openapi-cli get:/api/v3/brokerage/products -h`\n   - `coinbase-openapi-cli get:/api/v3/brokerage/accounts -h`\n   - `coinbase-openapi-cli post:/api/v3/brokerage/orders -h`\n\n3. Prefer product reads before private account or order workflows:\n   - `coinbase-openapi-cli get:/api/v3/brokerage/products product_type=SPOT limit=20`\n   - `coinbase-openapi-cli get:/api/v3/brokerage/best_bid_ask product_ids=BTC-USD,ETH-USD`\n\n4. Treat all order placement and cancellation as high-risk writes.\n\n## Operations\n\n- `get:/api/v3/brokerage/products`\n- `get:/api/v3/brokerage/products/{product_id}`\n- `get:/api/v3/brokerage/best_bid_ask`\n- `get:/api/v3/brokerage/accounts`\n- `get:/api/v3/brokerage/accounts/{account_uuid}`\n- `post:/api/v3/brokerage/orders`\n- `post:/api/v3/brokerage/orders/batch_cancel`\n- `get:/api/v3/brokerage/orders/historical/{order_id}`\n- `get:/api/v3/brokerage/orders/historical/batch`\n\n## Guardrails\n\n- Keep automation on the JSON output envelope; do not use `--text`.\n- Parse stable fields first: `ok`, `kind`, `protocol`, `data`, `error`.\n- `uxc` mints a fresh short-lived Coinbase JWT on each private request; do not try to bind a stale pre-generated bearer token when `jwt_bearer_v1` is available.\n- Coinbase exports ES256 private keys in more than one PEM form; this skill expects the raw downloaded PEM and does not require a manual PKCS#8 conversion step.\n- Treat `post:/api/v3/brokerage/orders` and `post:/api/v3/brokerage/orders/batch_cancel` as high-risk writes.\n- Keep initial product/account pulls narrow with small `limit` values.\n- `coinbase-openapi-cli <operation> ...` is equivalent to `uxc https://api.coinbase.com --schema-url <coinbase_advanced_trade_openapi_schema> <operation> ...`.\n\n## References\n\n- Usage patterns: `references/usage-patterns.md`\n- Curated OpenAPI schema: `references/coinbase-advanced-trade.openapi.json`\n- Coinbase Advanced Trade overview: https://docs.cdp.coinbase.com/coinbase-app/advanced-trade-apis/overview\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":723,"installsAllTime":27,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1773617058049,"updatedAt":1779078260081},"latestVersion":{"version":"1.0.0","createdAt":1773617058049,"changelog":"Initial release with OpenAPI-based Coinbase Advanced Trade integration.\n\n- Run Coinbase Advanced Trade REST APIs via `uxc`, using a curated OpenAPI schema.\n- Supports key product, account, and order operations; excludes Exchange/Prime/Derivatives APIs.\n- Includes concise JWT bearer authentication setup using Coinbase API key material and `uxc`'s `jwt_bearer_v1` signer.\n- Provides guidance on safe high-risk operations and parsing stable JSON output.\n- Requires prior installation of `uxc` and network access to `api.coinbase.com`.\n- Detailed documentation for setup, core workflow, and best practices included in SKILL.md.","license":"MIT-0"},"metadata":null,"owner":{"handle":"jolestar","userId":"s1769rm50f8wvzw550m22hg10x83gkem","displayName":"jolestar","image":"https://avatars.githubusercontent.com/u/77268?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089907810}}