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.