feat: configurable ticker window for market stats (1h, 4h, 1d)

- Replace hardcoded ticker_24h with ticker_stats supporting configurable window
- Add -w/--window flag to `market tickers` (choices: 1h, 4h, 1d, default 1d)
- Update TUI title and JSON output to include window field
- Keep opportunity/pf service on 1d default
- Sync tests and doc comments

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 11:11:11 +08:00
parent cf26a3dd3a
commit 4312b16288
7 changed files with 37 additions and 24 deletions

View File

@@ -278,7 +278,7 @@ def _render_tui(payload: Any) -> None:
]
)
_print_box_table(
"24H TICKERS",
f"TICKERS window={payload.get('window', '1d')}",
["Symbol", "Last Price", "Change %", "Quote Volume"],
table_rows,
aligns=["left", "right", "right", "right"],