AGENT SKILL

moonpay-export-data

Export portfolio balances and transaction history to CSV or JSON files. Use for spreadsheets, tax reporting, or record-keeping.

License 许可
MIT
最近更新
2026-10-08
Stars
★ 0
Forks
0

01 前言 Front Matter

name
moonpay-export-data
tags
[ "portfolio", "export" ]
description
Export portfolio balances and transaction history to CSV or JSON files. Use for spreadsheets, tax reporting, or record-keeping.

03 SKILL.md 正文

Export data

Goal

Save portfolio snapshots and transaction history to CSV or JSON files using mp output piped through jq. Useful for spreadsheets, tax reporting, and record-keeping.

Prerequisites

  • jq installed: which jq
  • Default output directory: ~/Documents/moonpay/ (create if needed)

Portfolio to CSV

Export all token balances for a wallet on a specific chain:

mkdir -p ~/Documents/moonpay

# Header + data
echo "symbol,name,amount,usd_value,price" > ~/Documents/moonpay/portfolio-$(date +%Y%m%d).csv

mp --json token balance list --wallet <address> --chain solana \
  | jq -r '.items[] | [.symbol, .name, .balance.amount, .balance.value, .balance.price] | @csv' \
  >> ~/Documents/moonpay/portfolio-$(date +%Y%m%d).csv

Multi-chain portfolio

Loop over chains and append to one file:

FILE=~/Documents/moonpay/portfolio-$(date +%Y%m%d).csv
echo "chain,symbol,name,amount,usd_value,price" > "$FILE"

for CHAIN in solana ethereum base polygon arbitrum; do
  mp --json token balance list --wallet <address> --chain "$CHAIN" \
    | jq -r --arg chain "$CHAIN" '.items[] | [$chain, .symbol, .name, .balance.amount, .balance.value, .balance.price] | @csv' \
    >> "$FILE" 2>/dev/null
done

Note: EVM wallets share one address across all EVM chains. Solana uses a different address.

Transaction history to CSV

Export swap and bridge history. These are transactions executed via the CLI and registered with swaps.xyz — not all on-chain activity.

echo "date,type,from_chain,from_token,from_amount,to_chain,to_token,to_amount,usd,status" \
  > ~/Documents/moonpay/transactions-$(date +%Y%m%d).csv

mp --json transaction list --wallet <address> \
  | jq -r '.items[] | [
      .transactionId,
      .type,
      .from.chain, .from.token, .from.amount,
      .to.chain, .to.token, .to.amount,
      .usd,
      .status
    ] | @csv' \
  >> ~/Documents/moonpay/transactions-$(date +%Y%m%d).csv

Filter by chain

mp --json transaction list --wallet <address> --chain solana \
  | jq -r '.items[] | ...' >> transactions.csv

Portfolio to JSON

For structured data or programmatic use:

mp --json token balance list --wallet <address> --chain solana \
  | jq '.items | map({symbol, amount: .balance.amount, usd: .balance.value})' \
  > ~/Documents/moonpay/portfolio-$(date +%Y%m%d).json

Open exported file

After writing the file, open it in the default app:

# macOS — opens in Numbers/Excel
open ~/Documents/moonpay/portfolio-$(date +%Y%m%d).csv

# Linux
xdg-open ~/Documents/moonpay/portfolio-$(date +%Y%m%d).csv

Tips

  • jq @csv handles proper CSV escaping (quotes, commas in values)
  • Date-stamp filenames to keep a history: portfolio-20260222.csv
  • mp transaction list only includes CLI-executed swaps/bridges registered via swaps.xyz, not all on-chain transactions
  • For a quick summary without exporting, use mp token balance list --wallet <addr> --chain <chain> directly
  • EVM address is the same across ethereum, base, polygon, arbitrum, optimism, bnb, avalanche

Related skills

  • moonpay-check-wallet — View balances interactively
  • moonpay-block-explorer — Open exported transactions in block explorers
  • moonpay-trading-automation — Combine with scheduled exports for daily snapshots

04 同仓库更多 Skills

Solizardking
Solizardking/skillhub-main

zkrouter

Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.

★ 0
Solizardking
Solizardking/skillhub-main

zk

For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.

★ 0
Solizardking
Solizardking/skillhub-main

zk-omni-messaging

Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.

★ 0
Solizardking
Solizardking/skillhub-main

zerion-wallet-data

Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.

★ 0
Solizardking
Solizardking/skillhub-main

youtube-clipper

YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video

★ 0
Solizardking
Solizardking/skillhub-main

yield-optimization

Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.

★ 0