Skip to content

fix: CLI snapshot panic + at_time time format (fixes #180, #181)#182

Merged
userFRM merged 1 commit into
mainfrom
fix/cli-snapshot-panic-and-at-time
Apr 6, 2026
Merged

fix: CLI snapshot panic + at_time time format (fixes #180, #181)#182
userFRM merged 1 commit into
mainfrom
fix/cli-snapshot-panic-and-at-time

Conversation

@userFRM
Copy link
Copy Markdown
Owner

@userFRM userFRM commented Apr 6, 2026

Summary

Two pre-existing CLI bugs found during live endpoint testing:

  1. Snapshot commands panicked -- get_arg(m, "symbols") but clap arg registered as "symbol". Fixed.
  2. at_time commands failed -- server expects hh:mm:ss.SSS but CLI passed raw milliseconds. Added normalize_time() that auto-converts. Both 34200000 and 09:30:00.000 now work.

Test plan (live, market open)

  • tdx stock snapshot_ohlc AAPL -- open: 256.9625, close: 259.3901
  • tdx stock snapshot_quote AAPL -- bid: 259.38, ask: 259.42
  • tdx stock at_time_trade AAPL 20260401 20260402 34200000 -- ms format works
  • tdx stock at_time_trade AAPL 20260401 20260402 09:30:00.000 -- hh:mm:ss works

🤖 Generated with Claude Code

- Snapshot commands used get_arg(m, "symbols") but clap arg is "symbol"
  causing panic on every snapshot call. Fixed to "symbol".
- at_time commands: server expects hh:mm:ss.SSS but users may pass
  milliseconds. Added normalize_time() that auto-converts ms to
  hh:mm:ss.SSS format. Both formats now accepted.

Fixes #180, #181

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@userFRM userFRM merged commit c177845 into main Apr 6, 2026
9 checks passed
@userFRM userFRM deleted the fix/cli-snapshot-panic-and-at-time branch April 6, 2026 14:42
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