Skip to content

feat(cli): preserve optional full trade timestamps - #4

Merged
ApeCodeLab merged 3 commits into
mainfrom
feat/optional-trade-timestamps
Sep 15, 2026
Merged

ApeCodeLab merged 3 commits into
mainfrom
feat/optional-trade-timestamps

Conversation

@ApeCodeLab

Copy link
Copy Markdown
Contributor

Summary

  • Add optional --traded-at <ISO timestamp> to public trade buy and trade sell.
  • Preserve the supplied timestamp verbatim in the existing transactions.traded_at field.
  • Keep date-only --date workflows valid; derive quote lookup date from --traded-at only when needed.
  • Keep date filters, human-readable lists, review output, and day-level performance behavior compatible.
  • Add core/CLI regression tests and English/Chinese public documentation.

Example

finsight trade buy <account> PDD 30 \
  --price 77.5 \
  --traded-at 2026-09-10T09:45:00-04:00 \
  --json

Test plan

  • pnpm test
  • pnpm typecheck
  • pnpm build
  • git diff --check
  • Built CLI smoke check for buy and sell help output

This PR contains only public code, tests, and public documentation. It does not include personal databases, screenshots, or private operator scripts.

公开交易 CLI 现在支持可选的 ISO 执行时间,并原样保存到现有 traded_at 字段;没有可靠时间时仍可只使用日期。日期筛选、行情查询、交易列表和 review 输出保持向后兼容。

验证:
- pnpm test
- pnpm typecheck
- pnpm build
- git diff --check
- CLI buy/sell --help smoke test

范围:仅公开 core/CLI、测试和文档;不包含个人数据、截图或私有脚本。
Disable the normal price-deviation warning in timestamp persistence tests so CI verifies timestamp behavior without depending on the runner's live historical quote.
Commander exposes `--no-quote` and `--no-warn` as `quote=false` and `warn=false`. Read those canonical option fields so non-interactive trade tests and callers bypass market lookup/warnings as documented.
@ApeCodeLab
ApeCodeLab merged commit cff7c07 into main Sep 15, 2026
1 check passed
@ApeCodeLab
ApeCodeLab deleted the feat/optional-trade-timestamps branch September 15, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant