多链加密货币投资组合追踪,实时价格、盈亏及提醒,支持 EVM(以太坊、Base、Arbitrum、Polygon、Optimism)、Solana 以及手动输入。
Track your crypto portfolio across multiple chains with real-time prices, P&L calculation, and optional alerts. Zero API keys needed for basic functionality.
bash
# Check a single wallet
bash scripts/check-wallet.sh 0xYourAddress ethereum
# Full portfolio scan (all configured wallets)
bash scripts/portfolio.sh
# Price check
bash scripts/price.sh BTC ETH SOL
Create portfolio.json in your workspace:
json
{
"wallets": [
{ "address": "0x...", "chain": "ethereum", "label": "Main" },
{ "address": "0x...", "chain": "base", "label": "Trading" },
{ "address": "0x...", "chain": "arbitrum", "label": "DeFi" },
{ "address": "C122gx...", "chain": "solana", "label": "SOL Wallet" }
],
"manual": [
{ "token": "BTC", "amount": 0.5, "cost_basis": 30000 }
],
"alerts": [
{ "token": "BTC", "above": 70000, "message": "BTC broke $70K!" },
{ "token": "ETH", "below": 2000, "message": "ETH dropped below $2K" }
]
}
bash
bash scripts/portfolio.sh
Output:
text
📊 Portfolio — 31 Mar 2026
Wallet: Main (ethereum)
0.5 ETH = $1,250.00
1000 USDC = $1,000.00
Wallet: Trading (base)
500 USDC = $500.00
Total: $2,750.00
24h Change: +$45.20 (+1.67%)
bash
bash scripts/price.sh BTC ETH SOL MATIC
Uses CoinGecko free API (no key, 30 calls/min).
bash
# EVM chains (free public RPC)
bash scripts/check-wallet.sh 0xAddress ethereum|base|arbitrum|polygon|optimism
# Solana
bash scripts/check-wallet.sh SolAddress solana
bash
bash scripts/pnl.sh
Compares current value vs cost basis (from portfolio.json manual entries or historical snapshots).
bash
bash scripts/alerts.sh
Checks configured alerts and outputs triggered ones. Run via cron for continuous monitoring.
ChainRPCToken StandardEthereumetherscan free / public RPCERC-20Basebasescan / public RPCERC-20Arbitrumarbiscan / public RPCERC-20Polygonpolygonscan / public RPCERC-20Optimismoptimistic.etherscan / public RPCERC-20Solanasolana mainnet-beta RPCSPL
Add to OpenClaw cron for automated tracking:
text
Portfolio snapshot: bash ~/path/to/scripts/portfolio.sh --json >> ~/portfolio-history.jsonl
Price alerts: bash ~/path/to/scripts/alerts.sh