portfolio

portfolio is a command for Claude Code from visusnet/coinbase-mcp-server. It costs 0 tokens per session (597 once invoked), scanned A, original, MIT.

A command that displays balances, open trading positions, profit or loss, and session trading statistics in a fixed compact format.

In plain words
What is it for?
Use it to review account balances, current positions, entry and market prices, stop-loss and take-profit levels, and trading results.
Why use it?
It puts the main portfolio figures in one short report instead of requiring several separate checks.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/visusnet/coinbase-mcp-server/portfolio
Clone the repo
git clone --depth 1 https://github.com/visusnet/coinbase-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for portfolio

README.md
[![agentmods](https://agentmods.dev/badge/commands/visusnet/coinbase-mcp-server/portfolio.svg)](https://agentmods.dev/commands/visusnet/coinbase-mcp-server/portfolio)
Your own site
<a href="https://agentmods.dev/commands/visusnet/coinbase-mcp-server/portfolio"><img src="https://agentmods.dev/badge/commands/visusnet/coinbase-mcp-server/portfolio.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 597 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00597
Opus 5 $0.00000 $0.00298
Sonnet 5 $0.00000 $0.00119
Haiku 4.5 $0.00000 $0.00060

Measured 5d ago against content hash d5eb1ca6a46d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

portfolio scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/portfolio.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Portfolio Status

Display a compact portfolio status report with minimal token overhead.

Output Format

Use this EXACT format template (no deviation, no explanatory text before/after):

═══════════════════════════════════════════════════════════
                    PORTFOLIO STATUS
═══════════════════════════════════════════════════════════

💰 BALANCES
───────────────────────────────────────────────────────────
  EUR:    €{balance}
  {COIN}:  {amount} (~€{value})
  ─────────────────────────────
  TOTAL:  ~€{total}

📊 OPEN POSITIONS
───────────────────────────────────────────────────────────
  {PAIR} │ LONG │ Entry: €{entry} │ Current: €{current}
         │ Size: {size} │ P/L: {pnl} ({pnl_pct}%)
         │ SL: €{sl} │ TP: €{tp} │ Trail: {trail_status}

📈 SESSION STATS
───────────────────────────────────────────────────────────
  Started:     {start_time} UTC
  Trades:      {total} ({wins}W / {losses}L)
  Win Rate:    {win_rate}%
  Net P/L:     {net_pnl} ({net_pnl_pct}%)
  Fees Paid:   €{fees}

⏰ Updated: {timestamp} UTC
═══════════════════════════════════════════════════════════

Required Steps

  1. Get Balances: Call mcp_coinbase_list_accounts
  2. Get Prices: Call mcp_coinbase_get_best_bid_ask for held assets
  3. Read State: Per state-schema.md:
    • Session stats: session.stats.*
    • Budget: session.budget.*
    • Open positions: openPositions[]
    • Exit levels: openPositions[].riskManagement.*
  4. Format Output: Use template above

Output Rules

  • Round EUR to 2 decimals
  • Round crypto to 8 decimals
  • Show P/L in both absolute (€) and percentage
  • Show all exit levels (SL, TP, Trail status)
  • Trail status: Show price if active, "inactive" if not
  • If no positions: Show "None"
  • If no session: Show "No active trading session"
  • If state file is >24 hours old: Add warning "⚠️ State file is {age} old - may be outdated"

Error Handling

If API calls fail, show:

═══════════════════════════════════════════════════════════
                    PORTFOLIO STATUS
═══════════════════════════════════════════════════════════
⚠️  Error fetching data: {error_message}
    Last known state from: {last_update} UTC
═══════════════════════════════════════════════════════════

Read the full file on GitHub · 73 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 73 lines · 0 tokens per session scan A d5eb1ca6a46d

Subscribe to this mod's changes

portfolio is a command published in the GitHub repository visusnet/coinbase-mcp-server (6 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 597 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.