"IMPORTANT: It's a very promising bot, I made it entirely with some artificial intelligences. I don't have any programming knowledge and I already reached my limit of improvement. All corrections and updates will be welcome."
BOTXI is an advanced, automated cryptocurrency trading bot designed to operate across multiple exchanges simultaneously. It utilizes machine learning algorithms to predict price movements and execute trades based on configurable strategies. The bot features a graphical user interface (GUI) for easy management and monitoring of trading activities.
- Multi-exchange support
- Asynchronous operations for improved performance
- Machine learning-based price prediction
- Configurable trading parameters per symbol
- Real-time market data fetching
- Automatic order management
- Risk management features (e.g., daily loss limits)
- Encrypted configuration storage
- Detailed logging and CSV export of trades
- GUI for real-time monitoring and control
- Python 3.7+
- ccxt library
- pandas
- scikit-learn
- joblib
- cryptography
- tkinter and ttkbootstrap for GUI
- Clone the repository
- Install required packages:
pip install ccxt pandas scikit-learn joblib cryptography ttkbootstrap
The bot uses an encrypted configuration file (config.enc
) to store sensitive information. To set up:
- Run the bot for the first time to generate the encryption key
- Use the GUI to add exchanges and configure trading parameters
- The configuration will be automatically encrypted and saved
- Run the script:
python BOTXI31fix.py
- Use the GUI to start/stop the bot or individual exchange operations
- Monitor trading activities, open orders, and performance in real-time
initialize_exchanges()
: Sets up connections to configured exchangesreconnect_exchange()
: Handles automatic reconnection to exchanges
fetch_ohlcv_async()
: Retrieves OHLCV (Open, High, Low, Close, Volume) dataget_market_prices_async()
: Fetches current market prices for configured symbols
train_model()
: Trains a Random Forest Regressor model for price predictionpredict_next_price()
: Uses the trained model to predict the next price
process_symbol()
: Main trading loop for each symbolplace_order_async()
: Places buy/sell ordersmanage_open_buy_orders()
: Manages and updates open buy ordersplace_sell_orders()
: Places sell orders based on profit targets
calculate_daily_loss()
: Tracks daily losses per symboldeactivate_token_if_needed()
: Stops trading for a symbol if loss threshold is reached
BotGUI
class: Manages the entire GUI interface- Real-time updates for actions, orders, and connection status
- Controls for starting/stopping the bot and individual exchanges
save_trade_to_csv()
: Records trades in CSV formatsave_encrypted_config()
: Saves configuration in an encrypted file
- Automatic model retraining based on a configurable interval
- Rate limiting to prevent API request limits from being exceeded
- Graceful shutdown procedures to ensure all operations are properly closed
- Periodic updates of GUI elements for real-time monitoring
- API keys and other sensitive data are stored in an encrypted configuration file
- The encryption key is stored separately for added security
Detailed logs are saved to bot.log
, providing insights into the bot's operations, errors, and trading activities.
Users can customize various aspects of the bot:
- Trading parameters per symbol (spread, take profit, trade amount, etc.)
- Exchange-specific settings
- Model training parameters
- GUI update intervals
- The bot's performance depends on the quality of historical data and market conditions
- Users should thoroughly test the bot with small amounts before deploying with significant capital
- Cryptocurrency markets are highly volatile; use this bot at your own risk
- Implementation of additional trading strategies
- Support for more technical indicators
- Enhanced backtesting capabilities
- Integration with additional data sources for improved predictions
This bot is for educational and research purposes only. Users are responsible for any financial losses incurred while using this software. Always understand the risks involved in automated trading and cryptocurrency markets.
Contributions to improve BOTXI are welcome. Please submit pull requests or open issues for bugs and feature requests.
This README provides a comprehensive overview of the BOTXI trading bot, its features, setup process, and important considerations for users. It's designed to give both technical and non-technical users a clear understanding of the bot's capabilities and how to use it effectively.