🚀 Intelligent Fiat & Crypto converter bot.
- Python 98.2%
- Dockerfile 1.8%
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| config.py | ||
| db.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| main.py | ||
| mapper.py | ||
| rates.py | ||
| README.md | ||
| requirements.txt | ||
💎 GigaCoin - Advanced Currency Converter Bot
High-performance, production-ready Telegram bot for real-time currency conversion. Designed for CIS regions and crypto enthusiasts, supporting 13 currencies (Fiat + Crypto) with direct data fetching from official sources.
🚀 Key Features
- Multi-Currency Parsing: Advanced engine that detects multiple conversion requests within a single message.
- Example: "I spent 100 usd and another 5000 rubles" — the bot processes both in one go.
- Inline Mode: Convert currencies in any chat without adding the bot to the group.
- Usage: Simply type
@YourBotUsername 100 usdto get instant conversion results.
- Usage: Simply type
- Support for Multipliers: Understands common shorthand for large numbers like
k,kk(both English and Cyrillic).- Example:
10k,100кк.
- Example:
- Volume Statistics: Automatically tracks conversion volume in the chat's Main Currency (⭐).
- Daily Footer: Shows total volume processed "Today" at the bottom of every conversion.
- 7-Day History: Use
/statsto see a breakdown of volume over the last week. - Admin Controls: Admins can manually correct today's volume directly through the settings menu.
- Smart Routing: Direct fetching from official Central Bank APIs: CBR (RU), NBU (UA), NBRB (BY), NBK (KZ), and Global APIs.
- Crypto Support: Real-time prices for TON, BTC, and USDT via Binance API.
- 3-Tier Deletion Security: Admins can choose who can delete bot results:
- Admin Only: Strictly group administrators.
- User + Admin: The requester and administrators.
- Everyone: Any group member.
- Clean Input (Optional): A toggleable setting to automatically delete the user's original message along with the bot's result for a cleaner chat history.
- Safety Limits: Built-in protection that caps conversions at 1,000,000 to prevent spam and errors.
- Message Collapsing (Smart Timer): Automatically collapses full conversion lists into a clean, single "Main" currency pair after 15 seconds.
- Large Message Handling: Automatically splits responses if they exceed Telegram's 1024-character limit.
- High-Speed Caching: Stores retrieved exchange rates for 10 minutes to provide near-instant responses and reduce redundant requests to official banking APIs.
🛠 Supported Currencies
| Category | Currencies |
|---|---|
| Fiat | RUB, USD, EUR, UAH, BYN, MDL, KZT, AED, TRY, CNY |
| Crypto | TON, BTC, USDT |
| Special | Robux (mapped to UAH), Telegram Stars (XTR) |
🏗 Technology Stack
- Language: Python 3.11+
- Framework: Aiogram 3.x (Asynchronous)
- Database: SQLite (Persistent with Auto-Migrations)
- API Client: Aiohttp with SOCKS5 Proxy support
📦 Installation & Setup
1. Docker Deployment (Recommended)
- Clone the repository.
- Create a
.envfile. - Run:
docker-compose up -d --build
2. Manual Installation
- Install dependencies:
pip install -r requirements.txt - Run the bot:
python main.py
⚙️ Configuration (.env)
BOT_TOKEN=your_telegram_bot_token
PROXY_URL=socks5://admin:password@1.2.3.4:1080 # Optional
🖥 Commands & Usage
- Convert: Simply type an amount and currency (e.g.,
100 ton,500$). - Settings:
/settingsor/config(Admin only in groups).
📜 License
This project is licensed under the MIT License.