安全扫描
OpenClaw
安全
high confidenceThe skill's code and runtime instructions are coherent with a local A‑share simulated trading tool; it reads/writes local files and fetches market quotes from public endpoints — nothing indicates hidden exfiltration or unrelated privileges.
评估建议
This skill appears to do exactly what it says: a local simulated A‑share trading tool that can optionally connect to third‑party simulated accounts if you paste session cookies or broker tokens into ~/.openclaw/sim_trade/config.json. Before installing: (1) Understand that adding browser Cookies or broker tokens grants the skill access to that account data — store them only if you trust the environment and delete them when not needed. (2) Protect the config directory (file permissions) because cr...详细分析 ▾
✓ 用途与能力
Name/description (模拟交易盘) align with the included scripts: account, positions, trade, quote, sync, etc. Required resources (none declared) and the code's dependencies (requests) are appropriate for fetching quotes and running a local simulator.
ℹ 指令范围
SKILL.md and scripts operate on local files under ~/.openclaw/sim_trade and call public quote APIs (qt.gtimg.cn). The README instructs users how to copy browser Cookies for connecting to third‑party simulated platforms; that legitimately requires adding session cookies or broker tokens to config.json, but storing such secrets in plaintext is a risk the user must accept. Minor usability issue: example python -c commands in SKILL.md use a literal '~' inside a Python string which will not expand to the home directory, possibly writing to a filename that literally starts with '~/'.
✓ 安装机制
No install spec; this is instruction + code that runs with the system Python and the requests package (declared in skill.json). No downloads or third‑party install URLs are used by the skill itself.
✓ 凭证需求
The skill requests no environment variables or external credentials at install time. It does provide a config.json where users may place cookies or broker tokens if they choose to connect to real simulated accounts — that is proportionate to the claimed capability but does mean secrets will be stored locally in cleartext unless the user protects the file.
✓ 持久化与权限
always:false and no code modifies other skills or global agent settings. The skill creates/reads files only under ~/.openclaw/sim_trade, which is appropriate for its function.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.1.02026/3/6
● 无害
安装命令 点击复制
官方npx clawhub@latest install sim-trade
镜像加速npx clawhub@latest install sim-trade --registry https://cn.clawhub-mirror.com
技能文档
🎯 核心功能
| 功能 | 说明 |
|---|---|
| ✅ 真实行情 | 东方财富实时行情 API |
| ✅ 多平台模拟盘 | 同花顺/东方财富/蚂蚁财富(需登录) |
| ✅ 本地模拟 | 虚拟资金练习(无需外部账户) |
| ✅ 持仓管理 | 成本、数量、浮动盈亏 |
| ✅ 交易记录 | 完整成交日志 |
🚀 快速开始
1️⃣ 初始化(本地模拟模式)
cd ~/.openclaw/workspace/skills/sim-trade/scripts
python3 init_account.py
2️⃣ 行情查询
# 查询单只股票
python3 quote.py 600900# 批量查询持仓股票行情
python3 quote.py
🌐 连接真实模拟盘
方式一:东方财富模拟盘(需要 Cookie)
- 在浏览器登录东方财富模拟交易
- 获取 Cookie(开发者工具 → Network → 复制请求头中的 Cookie)
- 配置文件:
~/.openclaw/sim_trade/config.json
{
"mode": "eastmoney",
"cookie": "your_cookie_here"
}
方式二:同花顺模拟盘(需要 Cookie)
同上,获取同花顺账号的 Cookie
方式三:券商 API(如华泰、银河)
{
"mode": "broker",
"broker": "htf",
"token": "your_api_token"
}
📁 文件结构
sim-trade/
├── SKILL.md
├── README.md
└── scripts/
├── config.py
├── account.py
├── positions.py
├── quote.py # 行情查询
├── trade.py # 交易执行
├── sync.py # 同步真实账户
├── show_account.py
├── show_positions.py
├── list_trades.py
└── init_account.py
⚙️ 配置说明
config.py
# 交易模式
# - "local": 本地模拟(默认)
# - "eastmoney": 东方财富模拟盘
# - "tonghuashun": 同花顺模拟盘
# - "broker": 券商 API
TRADE_MODE = "local"# 东方财富 Cookie(获取模拟盘数据用)
EASTMONEY_COOKIE = ""
# 券商配置
BROKER = "htf" # 华泰
BROKER_TOKEN = ""
💡 使用示例
本地模拟交易
# 初始化
python3 init_account.py# 买入(市价)
python3 trade.py buy 600900 100
# 买入(限价)
python3 trade.py buy 600900 100 --price 27.00
# 卖出
python3 trade.py sell 600900 50
# 查看账户
python3 show_account.py
查询实时行情
python3 quote.py 600900
python3 quote.py 600900 600025 600919
⚠️ 风险提示
- 本系统仅供学习参考,不构成投资建议
- 模拟盘交易不代表真实交易结果
- 真实账户连接需要妥善保管账号信息
Sim Trade ✨
连接真实行情,练习实盘操作 📈🎮
连接真实行情,练习实盘操作 📈🎮
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制