TelEX is a modular, Telegram-based crypto trading bot framework that allows you to manage multiple exchange accounts ("instances") via a simple chat interface. Built on CCXT, it provides flexible, alias-based control over spot and futures markets on major crypto exchanges.
- 🔧 Add exchange instances dynamically from Telegram
- 💬 Control spot or futures accounts via simple text commands
- 🧠 Custom logic possible (e.g., trailing stop, break-even SL)
- 💾 Stores instance settings in a persistent config file
- 🛡️ Chat ID–restricted access for safety
- Python 3.9+
- CCXT (multi-exchange trading)
- python-telegram-bot
- JSON (for local config storage)
TelEX/
├── main.py # Telegram bot entry point
├── config/
│ └── exchange_instances.json # Saved exchange instances with API credentials
├── core/
│ ├── exchanges.py # Exchange instance logic
│ ├── trading.py # Trading actions (buy/sell/SL)
│ └── storage.py # JSON config file handler
├── requirements.txt
└── README.md
- Clone the repository
git clone https://github.com/gberenyi/TelEX.git
cd TelEX- Install dependencies
pip install -r requirements.txt- Set environment variables
export TELEGRAM_BOT_TOKEN="your_bot_token"
export TELEGRAM_CHAT_ID="your_allowed_chat_id"- Run the bot
python main.pyAdd new exchange configurations from Telegram using the /addinstance command:
/addinstance <alias> <exchange_id> <api_key> <api_secret>
Example:
/addinstance binfut binanceusdm YOUR_API_KEY YOUR_SECRET
The alias (binfut) can then be used to execute future trade commands.
- All API keys are stored locally in a JSON file
- Only the pre-defined
chat_idhas access to the bot - No external cloud services involved — fully self-hosted
/buy,/sell,/close,/statuscommands- Dynamic SL management (break-even, trailing SL)
- Position tracking and reporting
- Multiple user sessions
- Plugin-style strategy logic
This project is licensed under the MIT License.
See LICENSE for full details.
Developed by Gábor Berényi
Project repository: github.com/gberenyi/TelEX
TelEX – built for control freaks who trade smart.