Add date/time range support to get_historical_candles

- _fetch_candles now accepts explicit from_ts/to_ts timestamps; falls
  back to count-based window when omitted
- get_historical_candles accepts from_date/to_date in YYYY-MM-DD,
  YYYY-MM-DD HH:MM, or YYYY-MM-DD HH:MM:SS formats (all UTC)
- Yahoo Finance fallback switched from range= to period1/period2 so
  it respects the exact window in both modes
- Added 11 tests covering date range, datetime, end-of-day bump,
  invalid format, count cap, and pattern detection toggle
- gitignore uv.lock (Dockerfile uses pip, not uv sync)
This commit is contained in:
Achmad
2026-05-17 08:10:03 +00:00
parent b24a424c8f
commit 79d1e0e538
3 changed files with 137 additions and 20 deletions
+2 -1
View File
@@ -4,4 +4,5 @@ __pycache__/
.pytest_cache/
*.pyc
.vscode/
opencode.json
opencode.json
uv.lock