鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

tracking-crypto-portfolio

实时追踪加密货币投资组合的总价值、各资产持仓数量与成本、未实现盈亏及占比分布,识别集中度过高的风险仓位,并支持以表格、JSON 或 CSV 格式导出数据,便于税务申报与跨平台分析。

区块链商业与营销
访问 GitHub
文档Skills.MD
name
tracking-crypto-portfolio
description
Track cryptocurrency portfolio with real-time valuations, allocation analysis, and P&L tracking. Use when checking portfolio value, viewing holdings breakdown, analyzing allocations, or exporting portfolio data. Trigger with phrases like "show my portfolio", "check crypto holdings", "portfolio allocation", "track my crypto", or "export portfolio".
allowed-tools
Read, Write, Bash(crypto:portfolio-*)
version
2.0.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT

Tracking Crypto Portfolio

Overview

This skill provides comprehensive cryptocurrency portfolio tracking with:

  • Real-Time Valuations: Current prices from CoinGecko
  • Holdings Breakdown: Quantity, value, and allocation per asset
  • P&L Tracking: Unrealized gains/losses with cost basis
  • Allocation Analysis: Category breakdown and concentration flags
  • Multiple Export Formats: Table, JSON, CSV

Key Capabilities:

  • Track holdings across multiple assets
  • Calculate portfolio total value in USD
  • Identify overweight positions (concentration risk)
  • Export for analysis tools and tax reporting

Prerequisites

Before using this skill, ensure:

  1. Python 3.8+ is installed
  2. requests library is available: pip install requests
  3. Internet connectivity for CoinGecko API access
  4. A portfolio JSON file with your holdings

Portfolio File Format

Create a portfolio file (e.g., holdings.json):

▼
json
复制代码
{ "name": "My Portfolio", "holdings": [ {"coin": "BTC", "quantity": 0.5, "cost_basis": 25000}, {"coin": "ETH", "quantity": 10, "cost_basis": 2000}, {"coin": "SOL", "quantity": 100} ] }

Fields:

  • coin: Symbol (BTC, ETH, etc.) - required
  • quantity: Amount held - required
  • cost_basis: Average purchase price per coin (optional, for P&L)
  • acquired: Date acquired (optional, for records)

Instructions

Step 1: Assess User Intent

Determine what portfolio information the user needs:

  • Quick check: Total value and top holdings
  • Holdings list: Full breakdown of all positions
  • Detailed analysis: Allocations, P&L, risk flags
  • Export: JSON or CSV for external tools

Step 2: Execute Portfolio Tracking

Run the tracker with appropriate options:

▼
bash
复制代码
# Quick portfolio summary python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json # Full holdings breakdown python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --holdings # Detailed analysis with P&L and allocations python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --detailed # Export to JSON python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --format json --output portfolio_export.json # Export to CSV python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --format csv --output portfolio.csv

Step 3: Present Results

Format and explain the portfolio data:

  • Show total portfolio value prominently
  • Highlight 24h and 7d changes
  • Explain allocation percentages
  • Flag any concentration risks
  • For detailed mode, explain P&L calculations

Command-Line Options

OptionDescriptionDefault
--portfolioPath to portfolio JSON fileRequired
--holdingsShow all holdings breakdownfalse
--detailedFull analysis with P&Lfalse
--sortSort by: value, allocation, name, changevalue
--formatOutput format (table, json, csv)table
--outputOutput file pathstdout
--thresholdAllocation warning threshold25%
--verboseEnable verbose outputfalse

Allocation Thresholds

By default, positions > 25% allocation are flagged:

AllocationRisk LevelAction
< 10%LowNormal position
10-25%MediumMonitor closely
25-50%HighConsider rebalancing
> 50%Very HighSignificant concentration risk

Output

Table Format (Default)

▼
text
复制代码
============================================================================== CRYPTO PORTFOLIO TRACKER Updated: 2026-01-14 15:30 ============================================================================== PORTFOLIO SUMMARY: My Portfolio ------------------------------------------------------------------------------ Total Value: $125,450.00 USD 24h Change: +$2,540.50 (+2.07%) 7d Change: +$8,125.00 (+6.92%) Holdings: 8 assets TOP HOLDINGS ------------------------------------------------------------------------------ Coin Quantity Price Value Alloc 24h BTC 0.500 $95,000.00 $47,500.00 37.9% +2.5% ETH 10.000 $3,200.00 $32,000.00 25.5% +1.8% SOL 100.000 $180.00 $18,000.00 14.4% +4.2% ⚠ CONCENTRATION WARNING: BTC (37.9%) exceeds 25% threshold ==============================================================================

JSON Format

▼
json
复制代码
{ "portfolio_name": "My Portfolio", "total_value_usd": 125450.00, "change_24h": {"amount": 2540.50, "percent": 2.07}, "holdings": [ { "coin": "BTC", "quantity": 0.5, "price_usd": 95000, "value_usd": 47500, "allocation_pct": 37.9, "change_24h_pct": 2.5 } ], "meta": { "timestamp": "2026-01-14T15:30:00Z", "holdings_count": 8 } }

Error Handling

See {baseDir}/references/errors.md for comprehensive error handling.

ErrorCauseSolution
Portfolio file not foundInvalid pathCheck file path exists
Invalid JSONMalformed fileValidate JSON syntax
Coin not foundUnknown symbolCheck symbol spelling, use standard symbols
API rate limitedToo many requestsWait and retry, use caching

Examples

See {baseDir}/references/examples.md for detailed examples.

Quick Examples

▼
bash
复制代码
# Basic portfolio check python {baseDir}/scripts/portfolio_tracker.py --portfolio ~/crypto/holdings.json # Show all holdings sorted by allocation python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --holdings --sort allocation # Detailed analysis with 15% threshold python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --detailed --threshold 15 # Export for tax software python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --format csv --output tax_export.csv # JSON export for trading bot python {baseDir}/scripts/portfolio_tracker.py --portfolio holdings.json --format json --output portfolio_data.json

Resources

  • CoinGecko API: https://www.coingecko.com/en/api - Free crypto market data
  • Portfolio Schema: See PRD.md for complete portfolio file format
  • Configuration: See {baseDir}/config/settings.yaml for options
  • See {baseDir}/references/examples.md for integration examples
区块链
商业与营销

快捷安装

复制到终端去安装 Skill

npxskillsaddjeremylongshore/claude-code-plugins-plus-skills--skill"tracking-crypto-portfolio"
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
朱雀AI检测助手朱雀AI检测助手
零感AI零感AI
Skills 推荐
definition-of-done-generator
自动生成项目完成标准的规范定义与配置文件,提供符合企业级工作流要求的最佳实践指导,输出可直接投入生产环境的代码和验证结果,适用于需要标准化流程审批、合规审查及跨系统集成的复杂项目管理场景。
skill-planner
将研究结论转化为结构化、分阶段的落地执行方案,涵盖范围界定、任务拆解、风险预判与验证标准,确保每阶段目标明确、可独立验证,并自动生成符合规范格式的实施计划文档。
planning-with-files
通过创建任务计划、笔记与交付文件三个持久化文档,实现对复杂任务的结构化管理。在多阶段工作中保持目标清晰,动态更新进度并沉淀研究过程,适用于需长期跟踪的规划、研究及创作场景。
mermaid-sequence-diagram-creator
自动生成和优化序列图内容,支持可视化文档的快速构建与标准化输出,适用于图表设计、技术文档及演示材料的高效创作场景。
axiom-performance-profiling
通过系统化分析移动应用性能瓶颈,实现对CPU占用、内存增长、数据加载延迟及电池消耗的精准诊断。结合真实场景决策树与深度调优流程,在高压环境下区分表象与根源问题,避免无效优化,确保用户体验与系统资源的平衡。