Binance Futures Trading Bot — Technical-analysis automated crypto trading bot for Binance Futures with multiple strategies (Triple EMA, Stochastic RSI, ATR, Golden Cross, Breakout, Heikin Ashi), configurable leverage, trailing stops, multi-symbol support, and Tkinter GUI
Technical-analysis–driven automated crypto trading bot for Binance Futures
Features • Getting Started • Configuration • Usage • Project Structure • FAQ
| Resource | URL |
|---|---|
| Binance Exchange | https://www.binance.com |
| Binance Futures | https://www.binance.com/en/futures |
| API Management | https://www.binance.com/en/my/settings/api-management |
| Binance API Docs | https://developers.binance.com/docs/derivatives/usds-margined-futures/general-info |
| Binance Futures API | https://binance-docs.github.io/apidocs/futures/en/ |
| python-binance | https://github.com/sammchardy/python-binance |
|
|
- OS: Windows 7/8/10/11, Linux, or macOS
- Python: 3.7 or newer
- Internet: Stable connection with accurate system time (critical for Binance API)
git clone <repository-url>
cd Binance-Futures-Trading-Bot
pip install -r requirements.txt| Package | Version | Purpose |
|---|---|---|
| python-binance | ≥1.0.19 | Binance Futures API client |
| pandas | ≥1.5.0 | OHLCV data handling |
| numpy | ≥1.23.0 | Numerical operations |
| ta | ≥0.10.2 | Technical indicators |
| rich | ≥13.0.0 | Console UI & formatting |
| colorlog | ≥6.7.0 | Colored logging |
-
Create Binance API key at API Management with permissions: Read, Trade, Futures (no withdrawal needed).
-
Edit
config/live_trading_config.py:
@dataclass
class TradingConfig:
# Binance API credentials
api_key: str = "your_api_key_here"
api_secret: str = "your_secret_key_here"
# Trading parameters
leverage: int = 10
order_size: float = 20.0 # USDT per position
max_number_of_positions: int = 1
# Strategy (see list below)
trading_strategy: str = "tripleEMAStochasticRSIATR"
# Symbols
trade_all_symbols: bool = False
symbols_to_trade: List[str] = field(default_factory=lambda: ["BTCUSDT", "ETHUSDT"])
# TP/SL: 'USDT', '%', 'x (ATR)', swing levels
TP_SL_choice: str = "USDT"
SL_mult: float = 1.0
TP_mult: float = 2.0
# Trailing stop
use_trailing_stop: bool = True
trailing_stop_callback: float = 0.5 # 0.5%
# Timeframe: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1d
interval: str = "15m"Available strategies: tripleEMAStochasticRSIATR, tripleEMA, goldenCross, candle_wick, breakout, StochRSIMACD, stochBB, fibMACD, EMA_cross, heikin_ashi_ema2, heikin_ashi_ema.
python main.py┌─────────────────────────────────────────────────────────────┐
│ Binance Futures Trading Bot │
│ Technical analysis · Binance Futures │
├─────────────────────────────────────────────────────────────┤
│ Key Action │
│ 1 Install dependencies │
│ 2 Start bot │
│ 3 About │
│ 4 Settings │
│ 0 Exit │
└─────────────────────────────────────────────────────────────┘
Select option (0-4): 2
python main.py --guiClick Install dependencies first, then Start. The GUI provides terminal-style output, Settings, and About.
python main.py --runRuns one pass over configured symbols. For continuous trading, add a loop with time.sleep() in core/bot_class.py.
Binance-Futures-Trading-Bot/
├── main.py # Entry point, terminal menu, logo
├── requirements.txt
├── config/
│ └── live_trading_config.py # API keys, leverage, symbols, strategy
├── gui/
│ └── main_window.py # Tkinter window (Install, Start, Settings, About)
├── core/
│ ├── bot_class.py # Bot logic, make_decision()
│ ├── processor.py # Data → strategy → decision
│ └── validator.py # Config and symbol validation
├── strategies/
│ ├── trading_strats.py # All strategies
│ └── indicators.py # EMA, RSI, ATR
└── utils/
├── logger.py # Logging
├── file_handler.py # File helpers
└── binance_client.py # Binance Futures API wrapper
What permissions does the API key need?
Enable Read, Trade, and Futures. Do not enable Withdrawals. Restrict IP if possible.
Why is system time important?
Binance rejects requests with timestamp drift. Ensure NTP sync on Windows (Settings → Time & Language → Sync now) or timedatectl on Linux.
Why does the bot run only one cycle?
By design for safety. Add a while True loop with time.sleep(interval_seconds) in core/bot_class.py for continuous operation.
Can I use testnet?
Yes. Point python-binance to Binance Futures Testnet by setting the appropriate base URL in the client initialization.
Which strategy is best?
There is no universal best. tripleEMAStochasticRSIATR combines trend (EMA), momentum (RSI), and volatility (ATR). Backtest on historical data before live use.
Does the bot place real orders?
The bot generates signals (direction, SL, TP). Order execution logic can be extended in core/bot_class.py via BinanceClient. Start with paper trading.
How do I add a custom strategy?
Add a function in strategies/trading_strats.py that returns (direction, stop_loss, take_profit) and register it in _STRATEGIES.
This software is provided for educational and research purposes. Past performance does not guarantee future results. Use stop losses, start with small position sizes, and never invest more than you can afford to lose. The authors are not responsible for any financial losses incurred through use of this bot.
Support this project
ETH: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1
If this bot helps you, consider giving it a ⭐