A professional Python trading bot for Binance USDT-M Futures Testnet, featuring both CLI and Web interfaces with robust error handling. Perfect for testing trading strategies risk-free.
The APEX Binance Futures Trading Bot is live!
👉 Launch Web App
No installation required — just open in your browser and test trades on Binance Testnet.
The APEX bot interacts securely with the Binance Futures Testnet, allowing safe and realistic trading without using real funds.
↑ Screenshot of Binance Futures Testnet dashboard showing test order execution.
- Multiple Order Types
- MARKET, LIMIT, and STOP_LIMIT orders
- USDT-margined futures only
- Real-time order status updates
- Symbol-specific validation
-
Web Interface
- Modern, responsive dashboard
- Real-time order status
- Interactive order placement
- Clean, intuitive design
-
Command Line Interface
- Interactive mode with guided prompts
- Scriptable command-line arguments
- Detailed order validation
- Testnet-only operation (no real funds)
- Secure API key management with
.env - Comprehensive error handling
- Detailed logging to
bot.log - No persistent storage of sensitive data
- Python 3.8 or higher
- Binance Futures Testnet account
- Testnet API key with trading permissions
git clone https://github.com/pragyajhaa/apex-trading-bot.git
cd apex-trading-bot# Windows
python -m venv venv
.\venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txt- Create a
.envfile in the project root - Add your testnet API credentials:
BINANCE_API_KEY=your_testnet_api_key_here
BINANCE_API_SECRET=your_testnet_api_secret_here🔒 Security Note: Never commit your
.envfile. It's already in.gitignore.
- Start the web server:
streamlit run app.py
- Open your browser to
http://localhost:8501 - Configure your API keys in the sidebar
- Place orders using the intuitive interface
python basic_bot.pyFollow the on-screen prompts to place orders.
Market Order
python basic_bot.py --symbol BTCUSDT --side BUY --type MARKET --quantity 0.001Limit Order
python basic_bot.py --symbol ETHUSDT --side SELL --type LIMIT --quantity 0.1 --price 3500Stop-Limit Order
python basic_bot.py --symbol SOLUSDT --side BUY --type STOP_LIMIT --quantity 5 --price 150 --stop_price 155├── .github/ # GitHub workflows and templates
│ └── workflows/ # CI/CD workflows
├── docs/ # Documentation files
├── app.py # Streamlit web interface
├── basic_bot.py # Core trading bot implementation
├── .env.example # Example environment variables
├── requirements.txt # Python dependencies
├── README.md # This file
└── .gitignore # Git ignore rules
- Python 3.8+
python-binance- Binance API clientstreamlit- Web interfacepython-dotenv- Environment variable managementargparse- Command-line argument parsingLogging- Built-in Python logging module
Install all dependencies:
pip install -r requirements.txtContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- The bot only works with Binance Futures Testnet
- All trades are executed in test mode (no real funds)
- Never commit your
.envfile with real API keys - Monitor the
bot.logfile for detailed execution logs - Use at your own risk - always test thoroughly with small amounts first
- Binance API for their excellent documentation
- python-binance for the Binance API client
- Streamlit for the web interface framework
MIT License
Copyright (c) 2025 Pragya Jha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

