This project implements a cryptocurrency trading bot for Binance Futures. The bot uses a simple strategy based on comparing two consecutive 5-minute candles to make trading decisions on a specified trading pair.
- Automated trading on Binance Futures
- Customizable trading hours
- Implements a basic strategy comparing two consecutive candles
- Handles both long and short positions
- Includes stop-loss and take-profit orders
- Supports "flip" trades after stop-loss is triggered
- Python 3.7+
- Binance Futures account
- API key and secret from Binance
-
Clone this repository:
git clone https://github.com/yourusername/binance-futures-trading-bot.git cd binance-futures-trading-bot -
Install the required packages:
pip install binance-futures-connector pytz -
Create a
keys.pyfile in the Binance directory with your Binance API credentials:api = "your_api_key_here" secret = "your_secret_key_here"
Open the Futures_Cloud_Live_Run.py file in the Binance directory and adjust the following parameters as needed:
pair: The trading pair (e.g., "SUIUSDT")qty: The quantity to tradeleverage: The leverage to usetimezoness: Your preferred timezonestart_timeandend_time: The daily trading window
-
Navigate to the Binance directory:
cd Binance -
Run the bot with the following command:
python Futures_Cloud_Live_Run.py
The bot will run continuously, trading only during the specified hours each day.
- Check the
testingdirectory for other algorithms and helper functions. - The
algosdirectory contains test net testing codes for various trading algorithms.
Feel free to explore and modify these files to suit your trading strategies.
This bot is for educational purposes only. Use it at your own risk. Cryptocurrency trading carries a high level of risk, and you can potentially lose all your invested capital. Always start with small amounts and never trade more than you can afford to lose.
Contributions, issues, and feature requests are welcome. Feel free to check the issues page if you want to contribute.
This project is licensed under the MIT License - see the LICENSE file for details.