Skip to content

Fize/mmtickerlab / sim-trade

sim-trade

Verified

A 股专用的确定性模拟交易系统。具备严格的数据真实性门禁、五档盘口真实撮合、T+1 规则、持仓盈亏计算及 SQLite 可审计流水账本。当用户需要进行模拟交易下单、模拟买入/卖出、查询模拟盘持仓、账户资产或重置模拟盘时触发(包含触发词:模拟买入, 模拟卖出, 模拟交易, 查持仓, 模拟盘, 交易账本, sim trade, paper trading)。

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.
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall