mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-06 18:57:25 -04:00
Preserve existing merged.jsonl to avoid data loss and API rate limits. Only fetch new data if merged.jsonl is missing or empty. Problem: - Entrypoint always fetched fresh data from Alpha Vantage on every start - Overwrote existing mounted data directory - Caused API rate limit issues and data inconsistencies - Lost historical data needed for backtesting specific date ranges Solution: - Check if merged.jsonl exists and has content before fetching - Display stock count when using existing data - Provide manual refresh instructions for when updates are needed Benefits: - Faster container startup (no API calls if data exists) - Avoids Alpha Vantage rate limits (5 calls/min, 500/day) - Preserves user's existing historical datasets - Enables reliable backtesting with consistent data To refresh data: rm data/merged.jsonl && docker-compose restart
2.3 KiB
Executable File
2.3 KiB
Executable File