agentleFS
oidsdevoidsdev/honeypot/skills/coinbase/SKILL.md

coinbase

Skill0 starsChanged 21 days agoMITView on GitHub

Trade spot crypto on Coinbase Advanced Trade via the official REST API: list accounts and balances, get product prices, place and cancel limit/market orders, check order status and fills. Use when the user wants Coinbase trading, balances, or prices.

  • Reads credentials

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No bundled CLI — call the official REST APIs directly with any HTTP client (e.g.

    line 12
  2. Very specific:

    Place, cancel, and query orders via $BASE/orders: POST to create, POST $BASE/orders/batch_cancel to cancel, GET …

    line 27
  3. Very specific:

    Every request sends Authorization: Bearer <JWT>: an ES256 JWT signed with the EC private key, fresh per request (header …

    line 39
  4. Distinctive:

    Orders move real money: Never place orders from an exploratory session — only with the user's explicit trading authority and stated limits.

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Coinbase (Advanced Trade)

Purpose

Manage Coinbase Advanced Trade spot trading: accounts/balances, product prices, limit/market orders, cancels, order status, fills.

Tooling

No bundled CLI — call the official REST APIs directly with any HTTP client (e.g. curl). Public market data needs no auth; everything under /api/v3/brokerage needs the Authorization: Bearer <JWT> header from the Auth section below.

PUB=https://api.exchange.coinbase.com   # public market data (no auth)
BASE=https://api.coinbase.com/api/v3/brokerage

curl -s "$PUB/products" | head -c 600              # list spot products (public)
curl -s "$PUB/products/BTC-USD/ticker"             # BTC price + bid/ask (public)
curl -s -H "Authorization: Bearer $JWT" \
  "$BASE/accounts?limit=250"                       # balances (auth)

Place, cancel, and query orders via $BASE/orders: POST to create, POST $BASE/orders/batch_cancel to cancel, GET $BASE/orders/historical/{order_id} for status — same JWT header on each.

Auth

Credentials come from environment variables at runtime — never hardcoded, never written to files, logs, or memory.

  • COINBASE_API_KEY_NAME — key name like organizations/{orgId}/apiKeys/{keyId}, from the CDP portal (Secret API Keys tab, signature algorithm ECDSA, permissions View + Trade — never Transfer for trading jobs)
  • COINBASE_API_PRIVATE_KEY_PEM — EC private key PEM contents (shown once at key creation), or COINBASE_API_PRIVATE_KEY_PATH for a PEM file path
  • COINBASE_JWT_ISS — JWT issuer override (default cdp)
  • COINBASE_BASE_URL — optional override (default https://api.coinbase.com)

Every request sends Authorization: Bearer <JWT>: an ES256 JWT signed with the EC private key, fresh per request (header {alg,kid,nonce,typ}, claims {sub,iss,nbf,exp=nbf+120,uri="METHOD api.coinbase.com/api/v3/brokerage/<path>"}). The uri uses the full request path without the query string, and the bare API host (no scheme).

Operating Rules

  1. Orders move real money. Never place orders from an exploratory session — only with the user's explicit trading authority and stated limits.
  2. Order size is in base currency units (0.001 = 0.001 BTC), price in quote currency (USD). Limit orders are good-til-canceled; market orders are immediate-or-cancel (always pay taker).
  3. Fees (entry tier — verify the current schedule before sizing): ~0.40% maker / ~0.60% taker.
  4. Cancel goes through batch_cancel; a single id is fine.
  5. On 401/403, check the JWT was attached (Authorization header present) before blaming the key — and confirm the key was created with the ECDSA algorithm, not Ed25519 (unsupported by Coinbase App APIs).
  6. A static-mock sandbox exists at https://api-sandbox.coinbase.com (accounts + orders only, no live market) — useful for plumbing checks via COINBASE_BASE_URL.

Also on Honeypot — a free, open index of skills for AI agents: https://honeypot-e6c.pages.dev Image: Indexed on Honeypot

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.