Skip to main content

Use case: Multi-chain portfolio manager

Build a conversational portfolio dashboard that tracks holdings across Solana, Ethereum, Polygon, Base, and more—enriched with on-chain analytics, exportable for tax reporting, and connected to live price alerts and rebalancing execution.

Updated over 2 weeks ago

Tip: New to MoonPay CLI? Get installed and authenticated first with MoonPay CLI for AI agents before following this guide.

Installation


Install all required skills with a single command:

npx skills add moonpay/skills --skill moonpay-check-wallet dune-analytics allium-onchain-data moonpay-export-data moonpay-swap-tokens moonpay-price-alerts moonpay-block-explorer

Check your wallet balance


The moonpay-check-wallet skill returns balances with current USD values and percentage allocations across every chain your wallet is active on.

Note: moonpay-check-wallet aggregates balances across all chains your wallet is active on automatically. You don't need to check each chain separately.

Example prompt

What it does

> What's my wallet worth right now? Break it down by token and chain.

Gets total portfolio value and chain/token breakdown

> How much SOL do I have? What's my unrealized P&L since I bought in?

Tracks a specific position and calculates unrealized profit/loss

> Show me the combined balance across all my wallets: main, trading, and defi.

Aggregates balances across multiple wallets

Run deep on-chain analytics


Dune Analytics

For questions the wallet skill can't answer, use dune-analytics. Dune queries run DuneSQL against live on-chain data—the agent writes and executes the query, you just describe what you want to know.

Note: Dune Analytics queries consume Dune credits. A free tier is available, but complex or frequent queries may require a paid plan. Check your Dune credit balance before running large queries.

Example prompt

What it does

> Query Dune: show me all swaps I've made on Solana in the last 90 days, including entry price, exit price, and realized P&L per trade.

Analyzes detailed trading history

> Query Dune: how much USDC do I have deposited across all DeFi protocols on Ethereum right now? Break it down by protocol.

Tracks protocol-level exposure

> Query Dune: what's the holder distribution for JUP token? How concentrated is the top 10 wallets?

Aggregates balances across multiple wallets

Allium

allium-onchain-data complements Dune with a REST API for common queries that don't need custom SQL.

Example prompt

What it does

> Get the current price and 7-day price history for SOL, ETH, and BTC via Allium.

Retrieves token prices and history

> Show me all transactions from my wallet on Solana in the last 30 days via Allium.

Gets wallet transaction history

> Via Allium: show me all incoming and outgoing transfers for my wallet on Base in the last week.

Analyzes token transfer flow

Tip: Not sure whether to use Dune or Allium? Use Dune for custom SQL queries and complex on-chain analysis. Use Allium for faster, simpler queries like price history, wallet transactions, and token transfers.

Export data for tax and reporting


The moonpay-export-data skill produces clean CSV or JSON files ready for import into tax software or spreadsheets.

Note: Exported data reflects your portfolio at the time of export. For tax reporting, make sure to export at the end of the relevant tax period to capture the full year's activity.

Example prompt

What it does

> Export my current holdings to CSV.

CSV of current token balances and values

> Export all transactions from the last 12 months to JSON for my accountant.

JSON file of comprehensive trade history

> Export a summary of all realized gains and losses for the 2025 tax year.

Tax year summary

Set live price alerts


The moonpay-price-alerts skill runs locally as a background process to set and manage notifications for your positions.

Example prompt

What it does

> Alert me when SOL hits $300.

Sets a simple target price alert

> Alert me if ETH drops below $2,500.

Sets a stop-warning alert

> Set up alerts for my full portfolio: SOL at $250 (target) and $170 (stop), ETH at $3,500 (target) and $2,200 (stop), JUP at $2.00 (target).

Stacks multiple alerts across tokens

Tip: Want to act automatically when an alert triggers? See Use case: The autonomous trader to combine price alerts with automated trade execution.

Rebalance your portfolio


The agent calculates the trades needed to return your portfolio to a target allocation, then moonpay-swap-tokens executes them when you confirm.

Important: Rebalancing executes real swaps. Review the proposed trades carefully before confirming — the agent will not execute without your explicit approval.

Example prompt:

My target allocation is 50% SOL, 30% ETH, 20% USDC. What's my current allocation? What trades would I need to get back to target?

Here's how the process works:

  1. The agent calculates your current vs. target allocation

  2. The agent proposes the trades needed (e.g., sell $340 of ETH → SOL)

  3. You confirm to execute the swaps

Verify trades on-chain


After any swap or transfer, the moonpay-block-explorer skill opens the transaction in the correct block explorer automatically — no manual chain lookup or address formatting needed.

Example prompt:

Show me my last transaction on Solana.

Run a full portfolio review session


Important: This prompt triggers multiple actions, including live balance checks, Dune queries, a CSV export, and a price alert. Review each result before acting on any trading decisions it surfaces.

Trigger a comprehensive analysis and action session with a single prompt:

Give me a full portfolio review:

1. Current balances across all wallets and chains
2. P&L on my top 5 positions since entry
3. Any Dune data on unusual activity from my wallet in the last week
4. Export the full holding list to CSV
5. Set a new alert: notify me if my total portfolio value drops more than 15% from today's value

One session. Complete picture.

FAQs


What chains does this support?

This use case covers Solana, Ethereum, Polygon, and Base, plus any other chains your wallet is active on that moonpay-check-wallet detects.

Do I need all seven skills installed?

No. Install only the skills you need. The full command installs everything, but each skill works independently—for example, you can use moonpay-check-wallet and moonpay-price-alerts without the analytics or export skills.

How does the agent execute SQL queries on Dune?

You describe what you want in plain language. The agent writes and runs the DuneSQL query for you—no SQL knowledge required.

Is exported data compatible with tax software?

Yes. CSV and JSON exports from moonpay-export-data are formatted for direct import into common tax tools and spreadsheets.

Did this answer your question?