Modular, adaptive crypto trading bot built on CCXT with real-time execution, risk management, and Telegram control.
BitBot is a modular trading system designed for:
- ⚙️ Clean architecture and maintainability
- 📈 Real-time market execution
- 🧠 Strategy flexibility with RSI/SMA and predictive logic
- 🔐 Secure configuration using
.env - 💬 Remote control via Telegram
- 🔁 Continuous trading loop with configurable intervals
- 🎯 Dynamic Take-Profit / Stop-Loss (TP/SL)
- 📊 Volatility-aware trade logic
- 🧠 RSI + SMA strategy engine
- 🔮 Predictive trading mode
- 🛡️ Risk management with reserve protection and trade limits
- 💼 Portfolio tracking with drawdown monitoring
- 🧾 CSV trade logging
- 💬 Telegram command interface
- 🔄 Hot config reload
Full feature list: see features.md
bitbot/
├── core/ # Trading engine, portfolio, risk management
├── exchange/ # CCXT exchange integration layer
├── strategy/ # Trading strategies
├── services/ # Telegram integration and logging
├── utils/ # Indicators, helpers, time utilities
├── data/ # Trade logging and data handling
├── config/ # Configuration loader
└── main.py # Entry point
git clone https://github.com/qualitypro/bitbot.git
cd bitbotBitBot includes a helper script that automatically:
- Creates a virtual environment
- Installs dependencies
- Generates
config.jsonif missing - Generates
.envif missing - Launches the bot
./run.shOn first run, the script will create:
config.jsonfromconfig.example.json.envfromenv.example
Edit .env before running the bot with real credentials:
nano .envExample .env:
BITMART_API_KEY=your_api_key
BITMART_API_SECRET=your_api_secret
BITMART_API_MEMO=your_api_memo
TELEGRAM_BOT_TOKEN=your_telegram_token
TELEGRAM_CHAT_ID=your_chat_idAfter saving, run again:
./run.shIf you prefer to run without the helper script:
python main.pypython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py| Command | Description |
|---|---|
/pause |
⏸ Pause trading |
/resume |
|
/status |
📊 Show live status |
/config |
🧾 Show safe configuration |
/rebase |
🔄 Reset TP/SL |
/set key value |
⚙️ Update config at runtime |
/buy |
🛒 Manual buy |
/sell |
📉 Manual sell |
/portfolio |
💼 Show portfolio value |
/quote SYMBOL |
📡 Fetch market data |
/lottery |
🎯 Utility feature |
/help |
❓ Help menu |
- API keys are stored in
.env config.jsonis ignored by Gitconfig.example.jsonis provided as a safe template.gitignoreprotects local secrets and runtime files
Never commit real exchange keys, Telegram tokens, or production configuration files.
🔗 Trading Pair: SOL/USDT
💰 Balances: 0.000000 SOL | 0.024555 USDT
📈 Price: 67.376600
📊 Volatility: 0.000473 | Prediction: hold
🔒 TP: 68.419600 | ⚠️ SL: 66.806000
⏱ Uptime: 0:00:03
Default strategy:
- RSI period:
14 - SMA period:
20 - Momentum crossover logic
- Predictive mode configurable via
config.json
BitBot is currently developed and tested using the BitMart exchange through CCXT.
Because the exchange layer is modular, BitBot can be adapted to other CCXT-supported centralized cryptocurrency exchanges, including:
- Binance
- Coinbase
- Kraken
- KuCoin
- Other CCXT-compatible crypto exchanges
Note: Each exchange has different trading rules, including precision, minimum order size, rate limits, authentication, and symbol formats. Always test carefully before live trading.
BitBot is designed to run in a lightweight Python environment with minimal dependencies.
-
Operating System
- Linux tested on Fedora
- macOS should work
- Windows via WSL recommended
-
Python Version
- Python 3.9+
- Python 3.10 or newer recommended
-
Package Manager
pip
Installed via requirements.txt:
ccxt— exchange integrationrequests— HTTP communicationnumpy— indicators and calculationspython-dotenv— environment variable management
- Internet connection
- Valid exchange API credentials
- Optional Telegram bot token for remote control
Run syntax checks:
python -m py_compile $(find . -name "*.py")- Multi-pair trading
- Trailing TP/SL
- PostgreSQL trade logging
- Dynamic web dashboard
- Backtesting module
- Strategy registry
- Enterprise deployment profile
MIT License. See LICENSE.
This software is for educational purposes only.
Cryptocurrency trading involves significant risk. Use at your own discretion. No financial advice is provided.
Michael Dietz GitHub: qualitypro
💡 Built for adaptive, data-driven crypto trading.