Fize/mmtickerlab / sim-trade
sim-trade
VerifiedA 股专用的确定性模拟交易系统。具备严格的数据真实性门禁、五档盘口真实撮合、T+1 规则、持仓盈亏计算及 SQLite 可审计流水账本。当用户需要进行模拟交易下单、模拟买入/卖出、查询模拟盘持仓、账户资产或重置模拟盘时触发(包含触发词:模拟买入, 模拟卖出, 模拟交易, 查持仓, 模拟盘, 交易账本, sim trade, paper trading)。
| File | Kind | Size |
|---|---|---|
| .clawhubignore | other | 63 B |
| SKILL.md | skill md | 2.5 KB |
| agents/openai.yaml | config | 258 B |
| references/command_reference.md | markdown | 1.4 KB |
| references/data_contract.md | markdown | 2.9 KB |
| references/trading_rules.md | markdown | 2.3 KB |
| requirements.txt | manifest | 101 B |
| scripts/akshare_patch.py | script | 2.9 KB |
| scripts/simtrade.py | script | 10.0 KB |
| scripts/simtrade_core/__init__.py | script | 105 B |
| scripts/simtrade_core/database.py | script | 6.4 KB |
| scripts/simtrade_core/fees.py | script | 1.7 KB |
| scripts/simtrade_core/market_data.py | script | 9.5 KB |
| scripts/simtrade_core/models.py | script | 5.1 KB |
| scripts/simtrade_core/rules.py | script | 3.5 KB |
| scripts/simtrade_core/service.py | script | 39.4 KB |
| scripts/simtrade_core/trading_calendar.py | script | 4.1 KB |
| tests/test_live_data.py | script | 667 B |
| tests/test_simtrade.py | script | 10.4 KB |
references/command_reference.md
View on GitHub# Command reference
Place global options before the command:
```bash
simtrade.py [--json] [--db PATH] COMMAND
```
## Commands
```text
doctor [--code 600519]
quote CODE
account create --name NAME --cash AMOUNT
account list
account show [--account-id ID]
account configure [--account-id ID] [--commission-rate RATE] [--minimum-commission AMOUNT]
account archive --account-id ID --yes
order buy CODE SHARES --price PRICE [--account-id ID]
order sell CODE SHARES --price PRICE [--account-id ID]
order list [--account-id ID] [--status STATUS]
order show ORDER_ID
order cancel ORDER_ID
order process [--order-id ORDER_ID] [--account-id ID]
portfolio [--account-id ID]
history [--account-id ID] [--code CODE] [--limit N]
audit [--account-id ID]
```
## Order statuses
- `OPEN`: no visible executable quantity has filled.
- `PARTIALLY_FILLED`: some quantity filled; the remainder is still active.
- `FILLED`: the full quantity filled.
- `CANCELLED`: the user cancelled the remaining quantity.
- `EXPIRED`: the DAY order reached its expiry.
- `REJECTED`: validation rejected the attempted order before funds or shares were frozen.
All writes are SQLite transactions. Account archival requires an exact account ID, `--yes`, and no active orders.
Batch `order process` reports `processed` and `failed` arrays plus their counts. A failure for one order does not hide or roll back orders processed earlier in the batch.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |