每日自选股报告生成与发送,涵盖行情数据、KDJ指标、重点关注信号。
用户必须提供自选股列表,格式为 Python 字典:
python
STOCKS = {
"代码1": "名称1",
"代码2": "名称2",
# ...
}
股票代码规则:
6 开头 → 上交所(sh)0 或 3 开头 → 深交所(sz)1A0001(映射为 sh000001)3 开头(深交所)示例:
python
STOCKS = {
"1A0001": "上证指数",
"000001": "平安银行",
"600036": "招商银行",
"000858": "五粮液",
}
用户提供股票列表后,运行:
bash
cd /root/.openclaw/workspace/skills/stock-daily-report/scripts
# 编辑 daily_report.py,将 STOCKS 替换为用户提供的列表
python3 daily_report.py
bash
cd /root/.openclaw/workspace/skills/stock-daily-report/scripts
bash send_report.sh
bash
# 查看当前定时任务
crontab -l
# 编辑定时任务(每天08:30发送)
crontab -e
# 添加:30 8 * * * /root/.openclaw/workspace/skills/stock-daily-report/scripts/send_report.sh >> /tmp/stock_report.log 2>&1
hq.sinajs.cn)push2his.eastmoney.com)脚本功能daily_report.py生成报告内容(行情+KDJ),输出纯文本send_report.sh调用 Python 生成报告,通过 openclaw 发送飞书消息
text
stock-daily-report/
├── SKILL.md
└── scripts/
├── daily_report.py # 报告生成脚本
└── send_report.sh # 发送脚本
每次使用前,编辑 scripts/daily_report.py 中的 STOCKS 字典为用户提供的最新列表。