Files
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

1.6 KiB

Forex Indicator Telegram Bot

Minimal Telegram bot that serves forex prices and technical indicators (RSI, MACD, Bollinger Bands) on demand, powered by Twelve Data.

Get tokens

  1. Telegram bot token — message @BotFather, /newbot, copy the token.
  2. Twelve Data API key — sign up at twelvedata.com, free tier gives 800 req/day, 8 req/min.

Install

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

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 <PAIR> /price EURUSD Latest close price
/rsi <PAIR> <TF> /rsi EURUSD 1h RSI(14)
/macd <PAIR> <TF> /macd GBPUSD 4h MACD(12,26,9)
/bb <PAIR> <TF> /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.