Skip to content

Kratugautam99/Cryptrizx-Binance-Bot-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Cryptrizx-Binance-Bot

Cryptrizx Icon

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


πŸ”— Quick Links

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

πŸ”‘ API Credentials

To connect the bot with Binance Futures Testnet, you need to provide your API Key and Secret Key.

Where to Get Them

  1. Log in to Binance Futures Testnet.
  2. Go to the API Key tab (below the trading chart).
  3. Click Generate API Key.
  4. Copy both the API Key and Secret Key (the secret is shown only once).

How They’re Used

  • 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

Important Notes

  • 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 .env file 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.

Example .env File

BINANCE_API_KEY=your_testnet_api_key_here
BINANCE_API_SECRET=your_testnet_secret_here

⚑ Features

πŸ€– Trading Strategies

  • 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

🎯 Dual Interface

  • πŸ–₯️ CLI Mode - Fast, scriptable terminal interface
  • 🌐 GUI Mode - User-friendly web dashboard (Streamlit)

πŸ”’ Security & Management

  • Secure API key management via .env
  • Comprehensive activity logging (bot.log)
  • Modular and extensible architecture

πŸ“¦ Installation & Setup

Prerequisites

  • Python 3.10 or higher
  • Binance account with API keys
  • Git installed on your system

1. Clone Repository

git clone https://github.com/Kratugautam99/Cryptrizx-Binance-Bot-Project.git
cd Cryptrizx-Binance-Bot-Project

2. Environment Setup

Using 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      # Windows

3. Install Dependencies (If Created by Venv)

pip install -r requirements.txt

4. Configure API Keys

Create/update .env file in root directory:

BINANCE_API_KEY=your_actual_api_key_here
BINANCE_API_SECRET=your_actual_api_secret_here

πŸ–₯️ CLI Mode Usage

Execute trading strategies directly from terminal:

Basic Orders

python CLI_Mode/market_orders.py
python CLI_Mode/limit_orders.py

Advanced Strategies

python 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.py

🌐 GUI Mode Usage

Local Deployment

streamlit run GUI_Mode/app.py

Cloud Deployment

Access the docker container:
πŸ‘‰ Cryptrizx-Binance-Bot App


πŸ—οΈ Project Structure

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

πŸ“Š Logs & Monitoring

All trading activities are logged for monitoring and debugging:

tail -f bot.log  # Monitor logs in real-time

πŸ› οΈ Tech Stack

  • 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

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Contribution Areas:

  • New trading strategies
  • UI/UX improvements
  • Performance optimizations
  • Documentation enhancements
  • Bug fixes and testing

πŸ“„ License

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.


⭐ Support

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

About

The Cryptrizx-Binance-Bot-Project is a Python-based trading bot designed to interact with the Binance exchange, enabling automated order execution and strategy management through both a CLI and a Streamlit-powered GUI for flexible, user-friendly control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors