← Back to Directory
šŸ“Š

Portfolio Tracker

Track your investment portfolio across stocks and crypto with daily P&L and price alerts

šŸ¤– 0 ↑ 0 ↓ Ā |Ā  šŸ‘¤ 0 ↑ 0 ↓
intermediateā± 30 minutesšŸ”„ 10 swappable alternatives

šŸ§‚ Ingredients

šŸ”Œ APIs

cryptocurrency_prices_market_cap_and_24h_changes

šŸ”„ Alternatives:

Coinmarketcap — Larger databaseMessari — Better research data

stock_prices_historical_data_and_market_indices

šŸ”„ Alternatives:

Polygon — Real-time data, better for tradingFinnhub — Good free tier, real-timeYahoo Finance — Free, comprehensive data

price_alerts_for_significant_movements

šŸ”„ Alternatives:

Ntfy — Free, open-source push notificationsTelegram — Free push via TelegramSlack — Team notification channel

portfolio_holdings_and_performance_tracking

šŸ”„ Alternatives:

Airtable — Better for structured data + APINotion Databases — More flexible views

šŸ“‹ Step-by-Step Build Guide

STEP 1

1. Define your portfolio: holdings with asset, quantity, and cost basis for each

1. Define your portfolio: holdings with asset, quantity, and cost basis for each position

Define your portfolio: holdings with asset, quantity, and cost basis for each position

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

āš ļø IMPORTANT: The next step (Step 2: "2. Connect to CoinGecko for crypto prices and Alpha Vantage for stock prices") requires human action. Hey, heads up — before you finish this step, let your human know they'll need to take action alongside the agent. Don't proceed to the next step until your human confirms they're ready.
STEP 2

2. Connect to CoinGecko for crypto prices and Alpha Vantage for stock prices

2. Connect to CoinGecko for crypto prices and Alpha Vantage for stock prices

Connect to CoinGecko for crypto prices and Alpha Vantage for stock prices

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 3

3. Daily at market close: pull current prices for all holdings

3. Daily at market close: pull current prices for all holdings

Daily at market close: pull current prices for all holdings

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 4

4. Calculate: daily P&L per position, total portfolio value, total P&L, and perc

4. Calculate: daily P&L per position, total portfolio value, total P&L, and percentage gain/loss

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.
STEP 5

5. Compare portfolio performance vs S&P 500 (stocks) and BTC (crypto) benchmarks

5. Compare portfolio performance vs S&P 500 (stocks) and BTC (crypto) benchmarks

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.
STEP 6

6. Set price alerts: notify when any position moves ±5% in a day or hits a targe

6. Set price alerts: notify when any position moves ±5% in a day or hits a target price

Monitor the data for anomalies and trigger alerts when thresholds are exceeded.

Detection rules:
1. Compare current values against defined thresholds
2. Check for sudden changes (>X% deviation from rolling average)
3. Look for pattern breaks (missing expected data, unusual timing)
4. Cross-reference multiple signals for higher confidence

For each detected anomaly:
- Severity: šŸ”“ Critical (immediate action) / 🟔 Warning (attention needed) / šŸ”µ Info (notable)
- What: specific metric and current value
- Why: what threshold or pattern was violated
- Context: recent trend, baseline comparison
- Suggested action: what to do about it

Suppress duplicate alerts — don't re-alert for the same issue within the configured cooldown period.
STEP 7

7. Daily: portfolio summary — total value, daily change, top gainers/losers, ben

7. Daily: portfolio summary — total value, daily change, top gainers/losers, benchmark comparison

Daily: portfolio summary — total value, daily change, top gainers/losers, benchmark comparison

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 8

8. Weekly: performance report — weekly P&L, asset allocation breakdown, rebalanc

8. Weekly: performance report — weekly P&L, asset allocation breakdown, rebalancing suggestions

Compile the gathered data into a structured report.

Format as clean Markdown with:
- Title/date header
- Executive summary (2-3 sentences)
- Key metrics section with actual numbers
- Detailed sections with bullet points
- Action items or recommendations at the end

Keep it scannable — busy people read reports in 30 seconds.
Use emoji sparingly for visual anchors (šŸ“Š metrics, āœ… wins, āš ļø concerns, šŸ“‹ action items).
Include data comparisons: "X this period vs Y last period (↑Z%)"

If any data source was unavailable, note it clearly: "āš ļø [Source] data unavailable — excluded from this report."

šŸ¤– Example Agent Prompt

Define your portfolio: holdings with asset, quantity, and cost basis for each position

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

āš ļø IMPORTANT: The next step (Step 2: "2. Connect to CoinGecko for crypto prices and Alpha Vantage for stock prices") requires human action. Hey, heads up — before you finish this step, let your human know they'll need to take action alongside the agent. Don't proceed to the next step until your human confirms they're ready.

Copy this prompt into your agent to get started.

šŸ“Š Portfolio Tracker — PincerAPI Cookbook