A clean, button‑only Telegram bot for currency rates and conversions. New users pick language → source → base currency, then choose between:
- 1 BASE → all — view a well‑formatted table of rates for 1 base currency against all others (sortable).
- Convert amount — pick a target and enter an amount using an on‑screen numeric keypad (no typing).
Everything is persistent: language, data source (CBR/API), and base currency are saved and editable in Settings.
- 🧭 Onboarding flow: Language → Source (CBR/API) → Base currency (paginated list)
- 🧮 Calculator: keypad input, precise conversion, result in monospace
- 📊 Tables: aligned monospace output with sorting (code/name/rate)
- 💾 Persistence: user preferences survive bot restarts (PicklePersistence)
- 🔐 Secure config: .env for BOT_TOKEN, CURRENCYLAYER_API_KEY
- 🚀 Deployable anywhere: Heroku/Railway/Render or any VPS
src/ APIRate.py # currencylayer cross‑rates for arbitrary base BotMain.py # button‑only flow, i18n, persistence, calculator WEBScrappa.py # CBR rates via BeautifulSoup config.py # loads secrets from .env requirements.txt Procfile | runtime.txt (optional for Heroku)
python3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txt cp .env.example .env # then fill values python src/BotMain.py
.env
BOT_TOKEN=YOUR_TELEGRAM_BOT_TOKEN CURRENCYLAYER_API_KEY=YOUR_CURRENCYLAYER_API_KEY
1. /start → choose language
2. Choose source: CBR or currencylayer
3. Choose base currency (paginated)
4. Main menu:
- 1 BASE → all → view & sort table
- Convert amount → pick target → keypad → OK
- Settings → change language/source/base
Place images in docs/screenshots/ and reference here:
- Rotate any previously exposed keys/tokens.
- Respect currencylayer free‑tier limitations.
- Scraper may require maintenance if CBR markup changes.
GNU Affero General Public License v3 (AGPLv3)
- ✅ Share and showcase code freely.
- ✅ Others may learn and contribute.
- ❌ No one can take it private, build a SaaS on top, and profit without open-sourcing their changes.