Cryptrizx-Binance-Bot is a Python-based trading bot for the Binance Exchange, offering both CLI (Command-Line Interface) and GUI (Streamlit Web App) modes. It empowers traders to automate strategies ranging from simple market/limit orders to advanced executions like OCO, Grid, Stop-Limit, and TWAP.
π Docker Container Link: https://hub.docker.com/r/kratuzen/cryptrizx-binance-bot
| Section | Description |
|---|---|
| π API Credentials | API Key and Secret for Application |
| β‘ Features | Overview of bot capabilities |
| π¦ Installation | Setup and configuration guide |
| π₯οΈ CLI Mode | Command-line interface usage |
| π GUI Mode | Web interface usage |
| ποΈ Project Structure | Directory organization |
| π οΈ Tech Stack | Technologies used |
| π€ Contributing | How to contribute |
| π License | License information |
To connect the bot with Binance Futures Testnet, you need to provide your API Key and Secret Key.
- Log in to Binance Futures Testnet.
- Go to the API Key tab (below the trading chart).
- Click Generate API Key.
- Copy both the API Key and Secret Key (the secret is shown only once).
- API Key β Identifies your Testnet account.
- Secret Key β Signs requests so Binance knows theyβre really from you.
- Together, they allow the bot to:
- Place and cancel orders
- Check balances and margin
- Fetch account and position data
- These keys are Testnetβonly. They will not affect your real Binance account or funds.
- Keep them private β never commit them to GitHub or share them publicly.
- Store them in a
.envfile or set them as environment variables when running Docker. - If you suspect your keys are compromised, delete them in the Testnet dashboard and generate new ones.
BINANCE_API_KEY=your_testnet_api_key_here
BINANCE_API_SECRET=your_testnet_secret_here- Market Orders - Instant execution at current market price
- Limit Orders - Set your desired entry/exit prices
- Grid Orders - Automated buying low and selling high in ranges
- OCO Orders - One-Cancels-Other for risk management
- Stop-Limit Orders - Combine stop loss with limit orders
- TWAP Orders - Time-Weighted Average Price execution
- π₯οΈ CLI Mode - Fast, scriptable terminal interface
- π GUI Mode - User-friendly web dashboard (Streamlit)
- Secure API key management via
.env - Comprehensive activity logging (
bot.log) - Modular and extensible architecture
- Python 3.10 or higher
- Binance account with API keys
- Git installed on your system
git clone https://github.com/Kratugautam99/Cryptrizx-Binance-Bot-Project.git
cd Cryptrizx-Binance-Bot-ProjectUsing Conda:
conda env create -f environment.yml Using Venv: (Python Version = 3.13.7)
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windowspip install -r requirements.txtCreate/update .env file in root directory:
BINANCE_API_KEY=your_actual_api_key_here
BINANCE_API_SECRET=your_actual_api_secret_hereExecute trading strategies directly from terminal:
python CLI_Mode/market_orders.py
python CLI_Mode/limit_orders.pypython CLI_Mode/advance/grid_orders.py
python CLI_Mode/advance/oco_orders.py
python CLI_Mode/advance/stop_limit_orders.py
python CLI_Mode/advance/twap_orders.pystreamlit run GUI_Mode/app.pyAccess the docker container:
π Cryptrizx-Binance-Bot App
Cryptrizx-Binance-Bot/
β
βββ CLI_Mode/ # Command-line interface
β βββ client.py # Binance API client
β βββ market_orders.py # Market order execution
β βββ limit_orders.py # Limit order execution
β βββ advance/ # Advanced strategies
β βββ grid_orders.py
β βββ oco_orders.py
β βββ stop_limit_orders.py
β βββ twap_orders.py
β
βββ GUI_Mode/ # Web interface
β βββ app.py # Streamlit application
β
βββ images/ # Assets
β βββ bg.png
β βββ icon.png
β
βββ .env # Environment variables
βββ bot.log # Activity logs
βββ requirements.txt # Dependencies
All trading activities are logged for monitoring and debugging:
tail -f bot.log # Monitor logs in real-time- Python 3.10+ - Core programming language
- python-binance - Binance API integration
- Streamlit - Web application framework
- python-dotenv - Secure configuration management
- Logging - Activity tracking and audit trails
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- New trading strategies
- UI/UX improvements
- Performance optimizations
- Documentation enhancements
- Bug fixes and testing
This project is licensed under the MIT License - see the LICENSE file for details.
You are free to:
- Use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- Use commercially and privately
Attribution is appreciated but not required.
If this project helps you in your trading journey, please consider:
- Giving a star β on GitHub
- Sharing with fellow traders
- Reporting issues and suggesting features
π₯ Happy Trading with Cryptrizx-Binance-Bot! π₯
Automate with confidence, trade with precision, true creation of Kratu Gautam