📦 A Stock Paper Trade — 技能工具

v1.0.1

A股模拟炒股系统。当用户需要模拟炒股、查询行情、买卖下单、查看持仓盈亏时触发。支持实时行情、买卖下单、持仓管理、盈亏计算、涨跌排行。关键词:炒股、买入、卖出、持仓、盈亏、行情、涨停、跌停、选股、大盘。

0· 224·1 当前·1 累计
luaqnyin 头像by @luaqnyin·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/10
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill is plausibly a local A‑share paper trading tool, but there are multiple internal inconsistencies, missing dependency/install guidance, and at least one buggy/truncated implementation path that should be fixed before trusting or running it.
评估建议
This skill appears to implement a local A-share paper trading tool and does not request credentials, but I found several practical and safety issues you should consider before running it: - Dependency gap: The script imports requests and akshare but the skill declares only python3. Install those packages in an isolated virtualenv yourself (pip install requests akshare) rather than running arbitrary installer steps. Avoid running as root. - Inconsistent docs vs code: SKILL.md Quick Start says in...
详细分析 ▾
用途与能力
Name/description (A股纸面交易) aligns with the included code: it implements quote/kline/buy/sell/positions and stores a local portfolio. However SKILL.md claims 1,000,000 initial virtual funds in the Quick Start, while the code sets INITIAL_CASH = 50,000 (5万). The SKILL.md also mentions akshare but the skill only declares python3 as a required binary and provides no install steps for Python packages (requests, akshare) the script imports.
指令范围
SKILL.md instructs activating a specific virtualenv path (~/.agent-reach-venv/bin/activate) which is environment-specific and not justified; it assumes network access (ok for market data) and reads/writes a local file at ~/.openclaw/paper-trade/portfolio.json (expected). The instructions and script only fetch market data from public endpoints (sina, akshare) — no other external endpoints — but the instruction set does not declare or install the Python dependencies it uses.
安装机制
No install spec is provided (instruction-only install), yet the script depends on third‑party Python packages (requests, akshare). Because there is no guidance to install these, a user/agent might fail to run it or attempt to pip install arbitrary packages at runtime. There is no download of code from untrusted URLs in the package itself (script is included), so install risk is moderate due to missing dependency management rather than a hostile installer.
凭证需求
The skill requests no environment variables or external credentials and only writes a portfolio file under the user's home (~/.openclaw/paper-trade/portfolio.json). That storage and the network calls to fetch public market data are proportionate to the stated purpose.
持久化与权限
always is false and the skill does not request elevated privileges or modify other skills. It persists only its own portfolio JSON under the user's home, which is consistent with a paper trading tool.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

🖥️ OSmacOS · Linux · Windows

版本

latestv1.0.12026/3/25

- Improved SKILL.md description for clearer skill triggers and supported commands. - Updated trigger wording to help users know when the skill will activate. - No functionality changes; documentation only.

无害

安装命令

点击复制
官方npx clawhub@latest install a-stock-paper-trade
镜像加速npx clawhub@latest install a-stock-paper-trade --registry https://cn.longxiaskill.com

技能文档

优化日期: 2026-04-02

# A股模拟炒股

本地纸面交易系统,基于 akshare 实时行情。无需任何外部账号,纯模拟。

快速开始

# 初始化账户(100万虚拟资金)
source ~/.agent-reach-venv/bin/activate
python3 {baseDir}/scripts/trader.py init

# 查大盘 python3 {baseDir}/scripts/trader.py quote --all

# 查个股行情 python3 {baseDir}/scripts/trader.py quote 600519 000001

# 搜索股票 python3 {baseDir}/scripts/trader.py search 茅台

# 买入(1手=100股,市价) python3 {baseDir}/scripts/trader.py buy 600519 1

# 买入(指定价格) python3 {baseDir}/scripts/trader.py buy 600519 2 --price 1700

# 卖出 python3 {baseDir}/scripts/trader.py sell 600519 1

# 查持仓 python3 {baseDir}/scripts/trader.py positions

# 账户总览 python3 {baseDir}/scripts/trader.py balance

# 交易记录 python3 {baseDir}/scripts/trader.py history --limit 10

# K线 python3 {baseDir}/scripts/trader.py kline 600519 --days 60

# 涨幅TOP10 python3 {baseDir}/scripts/trader.py rank --top 10

# 跌幅TOP10 python3 {baseDir}/scripts/trader.py rank --bottom --top 10

交易规则

  • 最小单位:1手 = 100股
  • 佣金:万三(最低5元)
  • 印花税:千一(仅卖出)
  • 不支持涨跌停价格下单(但当前版本未强制校验,agent 应自行判断)
  • 数据来源:东方财富(akshare),仅交易时间内有效

费用计算

费用买入卖出
佣金万三(最低5元)万三(最低5元)
印花税千一
过户费忽略(模拟简化)

数据存储

  • 位置:~/.openclaw/paper-trade/portfolio.json
  • 重置:python3 {baseDir}/scripts/trader.py init --reset

注意

  • 行情数据来自 akshare,依赖网络(不需要代理,东方财富国内直连)
  • 非 A 股交易时间行情可能不准确
  • 所有操作输出 JSON,方便 agent 解析
数据来源ClawHub ↗ · 中文优化:龙虾技能库