TradingAgents/tradingagents/dataflows
Andrew Kaszubski ae7899a6fc feat(dataflows): add data caching layer with rate limit awareness - Fixes #12
Implements [DATA-11] Data caching layer - FRED rate limits with:
- CacheEntry: Generic cache entries with TTL and metadata
- CacheStats: Hit/miss/stale statistics tracking
- RateLimitState: Per-source rate limit tracking with exponential backoff
- MemoryCache: In-memory LRU cache backend
- FileCache: File-based JSON cache backend
- DataCache: Main cache with source-specific TTLs and stale-while-rate-limited
- @cached decorator: Function result caching

Features:
- Multi-backend support (memory, file)
- TTL-based expiration with configurable per-source defaults
- Stale-while-revalidate when rate limited
- Thread-safe operations throughout
- 41 tests covering all components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 16:51:48 +11:00
..
__init__.py WIP 2025-09-26 16:17:50 +08:00
akshare.py feat(dataflows): add AKShare data vendor for US and Chinese stock data (Issue #16) 2025-12-26 10:42:15 +11:00
alpha_vantage.py Add Alpha Vantage API integration as primary data provider 2025-09-26 22:57:50 +08:00
alpha_vantage_common.py added fallbacks for tools 2025-10-03 22:40:09 -07:00
alpha_vantage_fundamentals.py Add Alpha Vantage API integration as primary data provider 2025-09-26 22:57:50 +08:00
alpha_vantage_indicator.py Improve Alpha Vantage indicator column parsing with robust mapping 2025-09-26 23:36:36 +08:00
alpha_vantage_news.py Add Alpha Vantage API integration as primary data provider 2025-09-26 22:57:50 +08:00
alpha_vantage_stock.py Add Alpha Vantage API integration as primary data provider 2025-09-26 22:57:50 +08:00
base_vendor.py feat(dataflows): add vendor registry pattern for extensible data vendor routing - Fixes #11 2025-12-26 16:47:41 +11:00
benchmark.py feat(dataflows): add benchmark data module with SPY, sector ETFs, RS, correlation, beta - Fixes #10 2025-12-26 16:14:57 +11:00
cache.py feat(dataflows): add data caching layer with rate limit awareness - Fixes #12 2025-12-26 16:51:48 +11:00
config.py chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
fred.py feat(dataflows): add FRED API integration for economic data - Fixes #8 2025-12-26 15:25:54 +11:00
fred_common.py feat(dataflows): add FRED API integration for economic data - Fixes #8 2025-12-26 15:25:54 +11:00
google.py feat: Add Anthropic LLM support and fix data vendor compatibility 2025-12-25 15:23:28 +11:00
googlenews_utils.py chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
interface.py feat(dataflows): add AKShare data vendor for US and Chinese stock data (Issue #16) 2025-12-26 10:42:15 +11:00
local.py WIP 2025-09-26 16:17:50 +08:00
multi_timeframe.py feat(dataflows): add multi-timeframe OHLCV aggregation - Fixes #9 2025-12-26 15:48:40 +11:00
openai.py WIP 2025-09-26 16:17:50 +08:00
reddit_utils.py chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
stockstats_utils.py Add Alpha Vantage API integration as primary data provider 2025-09-26 22:57:50 +08:00
utils.py chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
vendor_decorators.py feat(dataflows): add vendor registry pattern for extensible data vendor routing - Fixes #11 2025-12-26 16:47:41 +11:00
vendor_registry.py feat(dataflows): add vendor registry pattern for extensible data vendor routing - Fixes #11 2025-12-26 16:47:41 +11:00
y_finance.py feat: Add Anthropic LLM support and fix data vendor compatibility 2025-12-25 15:23:28 +11:00
yfin_utils.py chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00