Crypto SAFE Portfolio Analyzer Pro — Crypto SAFE Portfolio 分析器 Pro
v1.0.1Safe cryptocurrency portfolio 追踪ing and P&L analysis. 监控s portfolio value, calculates profit/loss with custom cost basis, 追踪s live prices via CoinGecko, and 生成s detAIled 报告s. Use for portfolio performance 追踪ing, P&L calculation, position 监控ing, allocation analysis, and market overviews.
运行时依赖
版本
Market cap data for supported cryptocurrencies
安装命令
点击复制技能文档
Crypto SAFE Portfolio 分析器 Pro
追踪 cryptocurrency portfolios, calculate P&L with custom cost basis, and 生成 comprehensive 报告s with live market data.
Overview
This 技能 provides professional-grade portfolio 追踪ing for cryptocurrency investors. It fetches live prices from CoinGecko, calculates accurate P&L based on your cost basis, and 生成s detAIled 报告s showing position breakdown, allocations, and performance 指标.
Key Features:
Real-time price 追踪ing for 20+ cryptocurrencies Custom cost basis for accurate P&L calculation Portfolio allocation analysis with tar获取 vs. actual comparisons Market sentiment analysis across watch列出s Multiple 输出 格式化s (text 报告s, JSON data) Integration-ready for Discord 机器人s, automated alerts, and cron jobs Quick 启动
- Analyze Portfolio Holdings
For a quick portfolio analysis, provide holdings as a JSON object:
python3 scripts/portfolio-分析器.py portfolio --holdings '{"BTC": 1.5, "ETH": 10.2, "SOL": 50, "DOGE": 10000}'
Expected 输出:
📊 CRYPTO PORTFOLIO 报告 ================================================== 💰 Total Value: $125,750.50 🟢 Total P&L: $15,750.50 (+14.32%)
📈 POSITION BREAKDOWN: BTC: 💵 Value: $89,237.50 (71.0% of portfolio) 🟢 P&L: $8,987.50 (+11.20%) 🔴 24h: -3.92%
- Market Overview
获取 sentiment and price overview for your watch列出:
python3 scripts/portfolio-分析器.py market
- 设置 Up Configuration
For advanced features like cost basis 追踪ing, 创建 portfolio-config.json:
{ "cost_basis": { "BTC": 45000, "ETH": 2800, "SOL": 85 }, "watch列出": ["BTC", "ETH", "SOL", "DOGE", "XRP"], "tar获取_allocation": { "BTC": 40, "ETH": 30, "SOL": 20, "Other": 10 } }
Core Capabilities
- Portfolio Value Calculation
Calculates total portfolio value with position-level breakdown:
Live pricing from CoinGecko API (no API key required) Cost basis 追踪ing for accurate P&L calculation 24-hour change for each position Portfolio allocation percentages Total portfolio P&L with percentage gAIns/losses
Supported Coins: BTC, ETH, SOL, DOGE, XRP, ADA, AVAX, LINK, DOT, UNI, NEAR, ATOM, and more.
- Market Analysis
Provides market sentiment analysis across your watch列出:
Market sentiment classification (Bullish/Bearish/Neutral) Average 24-hour change across all 追踪ed coins Individual coin performance with prices and changes Market cap data for supported cryptocurrencies
- 报告 Generation
Multiple 输出 格式化s for different use cases:
Text 格式化: Human-readable 报告s with emoji indicators and 格式化ted numbers
# 生成 text 报告 python3 scripts/portfolio-分析器.py portfolio --holdings holdings.json
JSON 格式化: Structured data for 自动化 and integrations
# 生成 JSON data for 自动化 python3 scripts/portfolio-分析器.py portfolio --holdings holdings.json --格式化 json
- Integration Ready
De签名ed for 自动化 and integration:
Discord 机器人 integration - Post dAIly portfolio 更新s Cron job 自动化 - Schedule regular portfolio 检查s Alert 系统s - 监控 portfolio value thresholds API consumption - JSON 输出 ready for 网页hooks and APIs Common Use Cases DAIly Portfolio 监控ing
设置 up automated dAIly 报告s:
# 添加 to cron or OpenClaw cron jobs python3 scripts/portfolio-分析器.py portfolio --holdings ~/.crypto/holdings.json > dAIly-报告.txt
Rebalancing Analysis
Compare current vs. tar获取 allocations:
设置 tar获取 allocations in portfolio-config.json 运行 portfolio analysis to see current allocations Identify positions that need rebalancing Performance 追踪ing
监控 P&L over time:
# 记录 dAIly values for trend analysis echo "$(date): $(python3 scripts/portfolio-分析器.py portfolio --holdings holdings.json --格式化 json | jq '.total_value')" >> portfolio-历史.记录
Tax 报告ing
生成 P&L data for tax calculations:
# 导出 detAIled P&L breakdown python3 scripts/portfolio-分析器.py portfolio --holdings holdings.json --格式化 json | jq '.breakdown'
Configuration Options Cost Basis 设置up
Define your average purchase prices for accurate P&L:
{ "cost_basis": { "BTC": 45000, // Your average BTC purchase price "ETH": 2800, // Your average ETH purchase price "SOL": 85 // Your average SOL purchase price } }
Without cost basis, P&L calculations use current price as basis (showing $0 P&L).
Watch列出 Customization
Customize which coins to 追踪 in market overviews:
{ "watch列出": ["BTC", "ETH", "SOL", "DOGE", "XRP", "ADA", "AVAX", "LINK"] }
Tar获取 Allocation
设置 portfolio allocation tar获取s for rebalancing analysis:
{ "tar获取_allocation": { "BTC": 40, // Tar获取 40% Bitcoin "ETH": 30, // Tar获取 30% Ethereum "SOL": 20, // Tar获取 20% Solana "Other": 10 // Tar获取 10% other as设置s } }
Error Handling
The 技能 includes robust error handling:
API 失败s: Graceful fallback when CoinGecko is unavAIlable Invalid holdings: Clear error messages for malfo