Files
Forex_bot/config.py
T
Harwinder b1687582ec Initial commit: Forex Indicator Telegram Bot MVP
Multi-indicator signal engine with RSI, MACD, Bollinger Bands,
EMA trend filter, ADX strength gate, Stochastic, ATR, and
higher-timeframe trend confirmation. Twelve Data API client
with in-memory cache and rate limiting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:50:13 -04:00

20 lines
616 B
Python

"""Configuration loaded from environment variables."""
from __future__ import annotations
import os
from dotenv import load_dotenv
load_dotenv()
TELEGRAM_TOKEN: str = os.getenv("TELEGRAM_TOKEN", "")
TWELVE_DATA_API_KEY: str = os.getenv("TWELVE_DATA_API_KEY", "")
SUPPORTED_PAIRS: list[str] = ["EURUSD", "GBPUSD", "USDJPY", "AUDUSD", "USDCAD", "XAUUSD"]
SUPPORTED_TIMEFRAMES: list[str] = ["15min", "1h", "4h", "1day"]
if not TELEGRAM_TOKEN or not TWELVE_DATA_API_KEY:
raise RuntimeError(
"Missing TELEGRAM_TOKEN or TWELVE_DATA_API_KEY. "
"Copy .env.example to .env and fill in values."
)