@coinbase/coinbase-cli 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +115 -106
- package/dist/version.txt +1 -1
- package/package.json +1 -1
- package/skills/coinbase/SKILL.md +32 -0
- package/skills/coinbase-trading/SKILL.md +7 -1
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.5
|
package/package.json
CHANGED
package/skills/coinbase/SKILL.md
CHANGED
|
@@ -24,6 +24,22 @@ Authenticated commands need a CDP API key configured per environment.
|
|
|
24
24
|
|
|
25
25
|
Each CDP key is scoped to one portfolio. To operate across portfolios, register one env per portfolio (`live-primary`, `live-trading`) and switch with `coinbase env live-trading` or per-command `-e live-primary`. See `coinbase-portfolios`.
|
|
26
26
|
|
|
27
|
+
## Permissions
|
|
28
|
+
|
|
29
|
+
By default agents prompt before each `coinbase` command. To reduce or remove those prompts, allow-list commands in your agent's permission settings. Offer the user two tiers:
|
|
30
|
+
|
|
31
|
+
- **Read-only** — never prompted for safe reads (prices, balances, history); still prompted before any order or transfer. Good default.
|
|
32
|
+
- **Everything** — never prompted at all, including orders and transfers. Confirm explicitly before enabling.
|
|
33
|
+
|
|
34
|
+
Allow-list rules for each tier:
|
|
35
|
+
|
|
36
|
+
| Tier | Rules |
|
|
37
|
+
| :--- | :--- |
|
|
38
|
+
| Read-only | `coinbase balance`, `coinbase products *`, `coinbase orders list`, `coinbase orders get *`, `coinbase orders fills`, `coinbase fees`, `coinbase env`, `coinbase portfolios list`, `coinbase portfolios get *` |
|
|
39
|
+
| Everything | `coinbase *` |
|
|
40
|
+
|
|
41
|
+
How to apply depends on the agent. For Claude Code, add the rules to `permissions.allow` in settings.json (e.g. `Bash(coinbase products *)`) — `~/.claude/settings.json` for all projects or `.claude/settings.json` to share with a team. Other agents have their own allow-list mechanism.
|
|
42
|
+
|
|
27
43
|
## MCP vs CLI — which lane
|
|
28
44
|
|
|
29
45
|
Both surfaces wrap the same API. Pick by the shape of the task:
|
|
@@ -35,6 +51,22 @@ Rule of thumb: one structured action → MCP; a pipeline, a stream, or a conditi
|
|
|
35
51
|
|
|
36
52
|
Add MCP with: `claude mcp add --scope user --transport stdio coinbase -- coinbase mcp`
|
|
37
53
|
|
|
54
|
+
## Install agent skills
|
|
55
|
+
|
|
56
|
+
Skills give your agent step-by-step guidance for common Coinbase workflows (trading, market data, watch, convert, portfolios).
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
coinbase skills add
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If non-interactive, pass the directory explicitly:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
coinbase skills add --dir ~/.claude/skills
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Skills auto-update on future `npm i -g @coinbase/coinbase-cli` upgrades.
|
|
69
|
+
|
|
38
70
|
## Discovery
|
|
39
71
|
|
|
40
72
|
```sh
|
|
@@ -8,6 +8,12 @@ requires: coinbase env configured with Trade permission (see `coinbase` skill)
|
|
|
8
8
|
|
|
9
9
|
Place and manage spot orders. **These are REAL orders.** Confirm the full plan (product, side, size) with the user before placing.
|
|
10
10
|
|
|
11
|
+
## Choosing the quote currency (USD vs USDC)
|
|
12
|
+
|
|
13
|
+
The examples below use USD or USDC arbitrarily for illustration — always apply the rule below for real trades.
|
|
14
|
+
|
|
15
|
+
Don't default to USD. If the user names a quote currency ("use my USDC"), use that pair. If they don't, check `coinbase balance` first and use whichever of USD/USDC they actually hold; if both, prefer USDC. If the pair you land on doesn't exist for that asset, say so instead of silently trying another one.
|
|
16
|
+
|
|
11
17
|
## Market orders
|
|
12
18
|
|
|
13
19
|
Side determines which size field you use:
|
|
@@ -23,7 +29,7 @@ coinbase orders create product_id=BTC-USD side=BUY type=market quote_size=100
|
|
|
23
29
|
# "Buy N USDC worth of <ASSET>" → BUY on <ASSET>-USDC with quote_size=N
|
|
24
30
|
coinbase orders create product_id=BTC-USDC side=BUY type=market quote_size=1
|
|
25
31
|
|
|
26
|
-
# Sell 0.5 ETH at market
|
|
32
|
+
# Sell 0.5 ETH at market (USD used here for illustration only — apply the rule above)
|
|
27
33
|
coinbase orders create product_id=ETH-USD side=SELL type=market base_size=0.5
|
|
28
34
|
```
|
|
29
35
|
|