Coding

A股模拟交易

Try it

严格行情门禁与可审计账本驱动的 A 股模拟交易系统

What it does

| 功能 | 说明 | |------|------| | ✅ **真实行情** | 东方财富实时行情 API | | ✅ **多平台模拟盘** | 同花顺/东方财富/蚂蚁财富(需登录) | | ✅ **本地模拟** | 虚拟资金练习(无需外部账户) | | ✅ **持仓管理** | 成本、数量、浮动盈亏 | | ✅ **交易记录** | 完整成交日志 |

The skill document

Sim Trade - 模拟股票交易盘 🎮📈

🎯 核心功能

功能说明
真实行情东方财富实时行情 API
多平台模拟盘同花顺/东方财富/蚂蚁财富(需登录)
本地模拟虚拟资金练习(无需外部账户)
持仓管理成本、数量、浮动盈亏
交易记录完整成交日志

🚀 快速开始

1️⃣ 初始化(本地模拟模式)

cd ~/.openclaw/workspace/skills/sim-trade/scripts
python3 init_account.py

2️⃣ 行情查询

# 查询单只股票
python3 quote.py 600900

# 批量查询持仓股票行情
python3 quote.py

🌐 连接真实模拟盘

  1. 在浏览器登录东方财富模拟交易
  2. 获取 Cookie(开发者工具 → Network → 复制请求头中的 Cookie)
  3. 配置文件:~/.openclaw/sim_trade/config.json
{
  "mode": "eastmoney",
  "cookie": "your_cookie_here"
}

同上,获取同花顺账号的 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 ✨ 连接真实行情,练习实盘操作 📈🎮

Related skills

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván854 installs69 stars

figma-use

Official

Run JavaScript against Figma files through the Plugin API with rules that prevent common script failures.

by OpenAI27.5k stars

Build, iterate, and benchmark agent skills with parallel test runs and quantitative eval assertions.

by Anthropic177.2k stars

cli-creator

Official

Build a durable, composable CLI from API docs, an OpenAPI spec, or existing scripts that Codex can run from any repo.

by OpenAI27.5k stars

aspnet-core

Official

Apply current official ASP.NET Core patterns across Blazor, Razor Pages, MVC, Minimal APIs, and controller-based apps.

by OpenAI27.5k stars

More from fize

Browse all skills

市场情报与资讯扫描 SOP。覆盖宏观政策、隔夜外盘(美股/A50/汇率)、板块资金流向及大单异动,输出标准化客观《市场情报快报》。只陈述客观事实,不夹带交易观点或操作建议。当用户需要获取市场情报、了解隔夜外盘行情、扫描宏观要闻或跟踪盘中主力资金与大单时触发(包含触发词:市场情报, 隔夜外盘, 盘前情报, 资金流向, 大单异动, market intel, overnight, macro news)。

by fize1 installs

多 Agent 并行投研与风控决策流水线。输入标的代码与日期,并发调度多个专业 Subagent 全面透视基本面 EPS 与多模型市值、筹码资金与机构热度、全网消息舆情,结合大势环境进行量化风控核验(一票否决门禁),最终交付综合决策研报。各专员 Prompt 独立存放于 agents/ 目录下,践行渐进式披露直接调用 market 技能获取底层数据,数据缺失时严格终止阻断。当用户需要启动多智能体对个股进行全流程深度透视、并行流水线分析或产出多维研报时触发(包含触发词:投研流水线, 多Agent分析, 并行深研, 标的透视, ticker pipeline)。

by fize2 installs

End-to-end brand visual identity (VI) design methodology — a six-stage workflow from brand soul discovery to visual identity system building and multi-touchpoint brand manual delivery. Covers core concept, logo design, color strategy, typography, graphic language, and touchpoint application. Use when: designing brand identity, visual identity systems (VI), logo design, brand guidelines, or brand manuals. Keywords: brand identity, VI设计, 品牌视觉系统, 品牌VI, logo design, 品牌设计, 品牌手册, brand guidelines.

by fize2 installs

Graphic design deep research: automatically collects design references across domestic and international platforms (Behance, Dribbble, Pinterest, Zcool, Huaban), performs cluster analysis on aesthetic trends, and outputs visual HTML research reports with reusable exploratory prompts. Use when: researching design directions, analyzing visual trends, gathering inspiration moodboards, or exploring visual styles. Keywords: 设计调研, 灵感调研, 风格调研, 视觉参考, 情绪板, design research, aesthetic trends, moodboard.

by fize1 installs

A股交易标准操作程序(SOP)总编排。从用户的自然语言输入出发,识别当前交易意图(盘前准备、盘中复盘、盘后复盘、个股深度研究、首板隔夜),按需编排调用现有技能流水线,最终输出可操作的决策建议。当用户提出日常交易操作、盘前准备、盘中复盘、盘后总结、全流程投研或个股深研请求时触发(包含触发词:今天怎么操作, 帮我做盘前, 复盘一下, 研究一下, 首板今晚要不要留, 当前市场适合买吗, 给我一套完整分析, 全流程分析, SOP, 操作建议, 我要开始做功课了, trading sop)。

by fize2 installs

个股及 ETF 标的基本面与技术面综合分析 SOP(支持 A 股、港股及美股)。融合真实 EPS 核算、多模型目标市值测算、财务三大表、20+ 项确定性技术指标及大势环境校准,输出标准化《标的量化投研报告》。当用户需要深度分析个股、评估公司基本面估值、计算目标价、分析财报或量化技术面时触发(包含触发词:个股分析, 基本面研究, 估值测算, 财报透视, 目标市值, asset analysis, valuation, DCF, PEG, EPS)。

by fize2 installs