Commit Graph

4 Commits

Author SHA1 Message Date
Harwinder 43cc4bdd42 Switch data source to Finnhub API; remove synthetic data fallback
Adds FinnhubDataProvider as a drop-in replacement for ForexDataProvider.
Rate limit or API errors raise DataUnavailableError immediately — the
Telegram bot shows a clean per-TF error card rather than fake prices.

- data_provider_finnhub.py: Finnhub client, OANDA symbol mapping,
  4h resampled from 60-min candles, shared module-level rate limiter
  (60 calls/min free tier), full OHLCV validation copied from original
- signal_aggregator.py: import FinnhubDataProvider alias ForexDataProvider
- config.py: add finnhub_api_key field (FINNHUB_API_KEY env var overrides)
- telegram_bot.py: remove synthetic-data warning and _SUPPORTED_PAIRS;
  unsupported pairs now show the engine's "data unavailable" card
- requirements.txt: add finnhub-python>=1.0

Set FINNHUB_API_KEY env var before running. main branch is untouched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:12:41 -04:00
Harwinder 94b93cf1e7 Fix XAU/USD display name, pip value, and invalid symbol validation
- config.py: add XAU/USD and XAG/USD to SYMBOL_DISPLAY; add PIP_VALUES
  map for commodities (gold pip = $0.01, not $0.0001)
- data_provider.py: use PIP_VALUES in get_pair_info so gold trade setup
  shows correct pip counts instead of 269,000 pips for a $27 SL
- main.py: validate symbols in symbol_from_name — rejects non-alpha
  inputs like '15M' with a helpful hint to use --timeframe instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 15:59:34 -04:00
Harwinder 242df24ca7 Fixed Bugs 2026-05-04 10:51:03 -04:00
harry e39054af02 Add config.py 2026-05-04 04:08:10 +00:00