# Forex Indicator Telegram Bot Minimal Telegram bot that serves forex prices and technical indicators (RSI, MACD, Bollinger Bands) on demand, powered by [Twelve Data](https://twelvedata.com/). ## Get tokens 1. **Telegram bot token** — message [@BotFather](https://t.me/BotFather), `/newbot`, copy the token. 2. **Twelve Data API key** — sign up at [twelvedata.com](https://twelvedata.com/), free tier gives 800 req/day, 8 req/min. ## Install ```bash cd forex_bot python -m venv .venv # Windows: .venv\Scripts\activate macOS/Linux: source .venv/bin/activate pip install -r requirements.txt cp .env.example .env # then edit .env and paste your tokens ``` > `pandas-ta` requires NumPy 1.x; the pinned `numpy==1.26.4` handles that. ## Run ```bash python main.py ``` Then open Telegram and message your bot. ## Commands | Command | Example | Description | |---|---|---| | `/start`, `/help` | `/help` | Welcome + command list | | `/pairs` | `/pairs` | List supported pairs and timeframes | | `/price ` | `/price EURUSD` | Latest close price | | `/rsi ` | `/rsi EURUSD 1h` | RSI(14) | | `/macd ` | `/macd GBPUSD 4h` | MACD(12,26,9) | | `/bb ` | `/bb USDJPY 1day` | Bollinger Bands(20,2) + price | **Supported pairs:** EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD **Supported timeframes:** 15min, 1h, 4h, 1day ## Notes - In-memory cache per (pair, timeframe) with TTL based on timeframe — keeps you well under the free-tier rate limit. - Simple in-process rate limiter caps to 8 calls/min. - No database, no scheduler, no charts — on-demand text only. _Educational only. Not financial advice._