Install
openclaw skills install etf-financeETF and fund portfolio manager with price alerts, profit/loss tracking, and position management. Track your ETF/fund holdings, calculate gains/losses, set price alerts, and monitor performance in real-time using 腾讯财经 (Tencent Finance) for Chinese A-shares and Yahoo Finance for US stocks.
openclaw skills install etf-financeA comprehensive ETF and fund portfolio management tool with real-time price tracking, profit/loss calculations, and price alert functionality.
cd ~/.openclaw/workspace/skills/etf-investor
python3 scripts/add_position.py SPY 150.50 100 "S&P 500 ETF"
参数:代码 | 买入价 | 数量 | 名称
python3 scripts/remove_position.py SPY
python3 scripts/list_positions.py
python3 scripts/portfolio_summary.py
python3 scripts/add_alert.py SPY 160.00 "price_up"
# 或
python3 scripts/add_alert.py SPY 140.00 "price_down"
python3 scripts/list_alerts.py
python3 scripts/remove_alert.py SPY
python3 scripts/check_alerts.py
python3 scripts/get_price.py SPY
python3 scripts/update_prices.py
持仓存储在 ~/.clawdbot/etf_investor/positions.json:
[
{
"symbol": "SPY",
"name": "S&P 500 ETF",
"buy_price": 150.50,
"quantity": 100,
"buy_date": "2026-02-23",
"current_price": 155.20,
"last_updated": "2026-02-23T10:30:00Z"
}
]
提醒存储在 ~/.clawdbot/etf_investor/alerts.json:
[
{
"symbol": "SPY",
"target_price": 160.00,
"condition": "price_up",
"created_at": "2026-02-23T10:00:00Z",
"triggered": false
}
]
cd ~/.openclaw/workspace/skills/etf-investor
bash scripts/install.sh
bash scripts/uninstall.sh
可以将 check_alerts.py 加入系统定时任务(如 cron)实现自动提醒:
# 每小时检查一次提醒
0 * * * * cd ~/.openclaw/workspace/skills/etf-investor && python3 scripts/check_alerts.py
add_position.py - 添加持仓remove_position.py - 删除持仓list_positions.py - 列出所有持仓portfolio_summary.py - 持仓摘要(含盈亏)add_alert.py - 添加价格提醒remove_alert.py - 删除价格提醒list_alerts.py - 列出所有提醒check_alerts.py - 检查提醒状态get_price.py - 获取单个价格update_prices.py - 批量更新价格install.sh - 安装脚本uninstall.sh - 卸载脚本