9f4a720e300cbf2fe13f5ca606923d830699d305
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
- Telegram bot token — message @BotFather,
/newbot, copy the token. - 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-tarequires NumPy 1.x; the pinnednumpy==1.26.4handles 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.
Description
Languages
Python
100%