← Back to Skills Marketplace
iamcooper2026

Crypto SAFE Portfolio Analyzer Pro

by iamcooper2026 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
191
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install crypto-safe-portfolio-analyzer-pro
Description
Safe cryptocurrency portfolio tracking and P&L analysis. Monitors portfolio value, calculates profit/loss with custom cost basis, tracks live prices via Coin...
README (SKILL.md)

Crypto SAFE Portfolio Analyzer Pro

Track cryptocurrency portfolios, calculate P&L with custom cost basis, and generate comprehensive reports with live market data.

Overview

This skill provides professional-grade portfolio tracking for cryptocurrency investors. It fetches live prices from CoinGecko, calculates accurate P&L based on your cost basis, and generates detailed reports showing position breakdown, allocations, and performance metrics.

Key Features:

  • Real-time price tracking for 20+ cryptocurrencies
  • Custom cost basis for accurate P&L calculation
  • Portfolio allocation analysis with target vs. actual comparisons
  • Market sentiment analysis across watchlists
  • Multiple output formats (text reports, JSON data)
  • Integration-ready for Discord bots, automated alerts, and cron jobs

Quick Start

1. Analyze Portfolio Holdings

For a quick portfolio analysis, provide holdings as a JSON object:

python3 scripts/portfolio-analyzer.py portfolio --holdings '{"BTC": 1.5, "ETH": 10.2, "SOL": 50, "DOGE": 10000}'

Expected Output:

📊 CRYPTO PORTFOLIO REPORT
==================================================
💰 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%

2. Market Overview

Get sentiment and price overview for your watchlist:

python3 scripts/portfolio-analyzer.py market

3. Set Up Configuration

For advanced features like cost basis tracking, create portfolio-config.json:

{
  "cost_basis": {
    "BTC": 45000,
    "ETH": 2800,
    "SOL": 85
  },
  "watchlist": ["BTC", "ETH", "SOL", "DOGE", "XRP"],
  "target_allocation": {
    "BTC": 40,
    "ETH": 30,
    "SOL": 20,
    "Other": 10
  }
}

Core Capabilities

1. Portfolio Value Calculation

Calculates total portfolio value with position-level breakdown:

  • Live pricing from CoinGecko API (no API key required)
  • Cost basis tracking 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.

2. Market Analysis

Provides market sentiment analysis across your watchlist:

  • Market sentiment classification (Bullish/Bearish/Neutral)
  • Average 24-hour change across all tracked coins
  • Individual coin performance with prices and changes
  • Market cap data for supported cryptocurrencies

3. Report Generation

Multiple output formats for different use cases:

Text Format: Human-readable reports with emoji indicators and formatted numbers

# Generate text report
python3 scripts/portfolio-analyzer.py portfolio --holdings holdings.json

JSON Format: Structured data for automation and integrations

# Generate JSON data for automation
python3 scripts/portfolio-analyzer.py portfolio --holdings holdings.json --format json

4. Integration Ready

Designed for automation and integration:

  • Discord bot integration - Post daily portfolio updates
  • Cron job automation - Schedule regular portfolio checks
  • Alert systems - Monitor portfolio value thresholds
  • API consumption - JSON output ready for webhooks and APIs

Common Use Cases

Daily Portfolio Monitoring

Set up automated daily reports:

# Add to cron or OpenClaw cron jobs
python3 scripts/portfolio-analyzer.py portfolio --holdings ~/.crypto/holdings.json > daily-report.txt

Rebalancing Analysis

Compare current vs. target allocations:

  1. Set target allocations in portfolio-config.json
  2. Run portfolio analysis to see current allocations
  3. Identify positions that need rebalancing

Performance Tracking

Monitor P&L over time:

# Log daily values for trend analysis
echo "$(date): $(python3 scripts/portfolio-analyzer.py portfolio --holdings holdings.json --format json | jq '.total_value')" >> portfolio-history.log

Tax Reporting

Generate P&L data for tax calculations:

# Export detailed P&L breakdown
python3 scripts/portfolio-analyzer.py portfolio --holdings holdings.json --format json | jq '.breakdown'

Configuration Options

Cost Basis Setup

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).

Watchlist Customization

Customize which coins to track in market overviews:

{
  "watchlist": ["BTC", "ETH", "SOL", "DOGE", "XRP", "ADA", "AVAX", "LINK"]
}

Target Allocation

Set portfolio allocation targets for rebalancing analysis:

{
  "target_allocation": {
    "BTC": 40,    // Target 40% Bitcoin
    "ETH": 30,    // Target 30% Ethereum
    "SOL": 20,    // Target 20% Solana
    "Other": 10   // Target 10% other assets
  }
}

Error Handling

The skill includes robust error handling:

  • API failures: Graceful fallback when CoinGecko is unavailable
  • Invalid holdings: Clear error messages for malformed JSON
  • Missing config: Uses sensible defaults when config files are missing
  • Network timeouts: 10-second timeout with error reporting

Integration Examples

Discord Bot Integration

const { exec } = require('child_process');

async function postPortfolioUpdate() {
  const command = 'python3 scripts/portfolio-analyzer.py portfolio --holdings holdings.json --format json';
  exec(command, (error, stdout) => {
    if (!error) {
      const portfolio = JSON.parse(stdout);
      const message = `📊 Portfolio: $${portfolio.total_value.toLocaleString()} | P&L: ${portfolio.total_pnl >= 0 ? '🟢' : '🔴'} ${portfolio.total_pnl_pct.toFixed(2)}%`;
      // Send to Discord channel
    }
  });
}

OpenClaw Automation

// In OpenClaw skills or cron jobs
const portfolioData = await exec('python3 ~/.openclaw/workspace/skills/crypto-portfolio-tracker/scripts/portfolio-analyzer.py portfolio --holdings holdings.json --format json');
const portfolio = JSON.parse(portfolioData);

if (portfolio.total_value > 100000) {
  await notify('Portfolio over $100k!');
}

Resources

scripts/

  • portfolio-analyzer.py: Main portfolio tracking and analysis script
  • portfolio-tracker.js: Node.js integration wrapper (adapted from crypto-alerts)

references/

  • usage-examples.md: Detailed examples, configurations, and integration patterns
  • config-example.json: Sample configuration file with all available options

For detailed examples and integration patterns, see references/usage-examples.md.

Usage Guidance
This skill appears to do what it says (fetch public market data and produce portfolio reports). Before installing or running it: 1) Review and create a safe config file (it will try to load ./portfolio-config.json, ../references/config-example.json, or ~/.openclaw/workspace/crypto-portfolio-config.json if present). 2) Ensure you have required runtimes/deps (Python + requests for the Python script; Node.js for the JS script). 3) There is no built-in Discord webhook/posting — if you add Discord integration, don't paste secret tokens into repository files; store them securely and review any code that would send them out. 4) Note small inconsistencies: the JS script reads ../config.json (not provided) while SKILL.md references portfolio-config.json — make sure your config filenames are correct. 5) Run the scripts locally on sample data first to confirm behavior and inspect outputs. If you want higher assurance, request a signed provenance/source URL from the publisher or run the code in an isolated environment.
Capability Analysis
Type: OpenClaw Skill Name: crypto-safe-portfolio-analyzer-pro Version: 1.0.1 The skill bundle provides legitimate cryptocurrency portfolio tracking and market analysis functionality. The Python script (portfolio-analyzer.py) and Node.js script (portfolio-tracker.js) fetch market data from reputable public APIs (CoinGecko, Coinbase, and Alternative.me) and perform P&L calculations based on user-provided holdings. There is no evidence of data exfiltration, credential theft, or malicious execution; the scripts use standard libraries for network requests and file handling, and the documentation aligns perfectly with the code's behavior.
Capability Assessment
Purpose & Capability
Name/description describe portfolio tracking, P&L, and market scanning; the included Python and Node scripts call CoinGecko, Coinbase, and public sentiment APIs and produce reports/alerts — all consistent with the stated purpose.
Instruction Scope
SKILL.md instructs the agent to run the included scripts, supply holdings/config JSON, and integrate with cron/Discord. The runtime instructions and commands stay within portfolio/reporting scope. Notes: examples reference child_process.exec for integrations (expected), and the skill will read local config files if present (./portfolio-config.json, ../references/config-example.json, or ~/.openclaw/...); this means it may load user-local configuration files if they exist.
Install Mechanism
No install spec is provided (instruction-only), which is low-risk. However the Python script imports the third-party 'requests' library and the Node script expects a local config.json — these runtime dependencies are not declared in SKILL.md/registry metadata, so users must install Python requests and have Node available manually. No network downloads or obscure external install URLs are present.
Credentials
The skill requests no environment variables, no credentials, and only calls public APIs (CoinGecko, Coinbase, alternative.me). The config examples include Discord/exchange fields but no tokens are required by the provided code. There is no evidence of unrelated credential access.
Persistence & Privilege
The skill does not request elevated platform privileges and 'always' is false. It reads/writes only expected local config paths and does not modify other skills or system-wide settings. track_wallet only modifies an in-memory structure and prints output (no implicit persistent storage).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install crypto-safe-portfolio-analyzer-pro
  3. After installation, invoke the skill by name or use /crypto-safe-portfolio-analyzer-pro
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Updated name for clarity and safety. Free version for community adoption.
Metadata
Slug crypto-safe-portfolio-analyzer-pro
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Crypto SAFE Portfolio Analyzer Pro?

Safe cryptocurrency portfolio tracking and P&L analysis. Monitors portfolio value, calculates profit/loss with custom cost basis, tracks live prices via Coin... It is an AI Agent Skill for Claude Code / OpenClaw, with 191 downloads so far.

How do I install Crypto SAFE Portfolio Analyzer Pro?

Run "/install crypto-safe-portfolio-analyzer-pro" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Crypto SAFE Portfolio Analyzer Pro free?

Yes, Crypto SAFE Portfolio Analyzer Pro is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Crypto SAFE Portfolio Analyzer Pro support?

Crypto SAFE Portfolio Analyzer Pro is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Crypto SAFE Portfolio Analyzer Pro?

It is built and maintained by iamcooper2026 (@iamcooper2026); the current version is v1.0.1.

💬 Comments