A Python-based cryptocurrency trading bot that uses technical analysis to make trading decisions on Binance Futures.
| Loss Trade | Profit Trade | Summary Report |
|---|---|---|
![]() |
![]() |
![]() |
- Real-time market analysis using technical indicators (RSI, EMA, Bollinger Bands)
- Multiple trading modes (safe, balanced, aggressive)
- Risk management with configurable stop-loss and take-profit levels
- Telegram notifications for trade entries, exits, and daily summaries
- Automated position management
- Performance tracking and reporting
- Trade during US market hours: 22:00–07:00 (Indonesian time).
- Clone the repository:
git clone https://github.com/akimabs/autrade.git
cd autrade- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the package:
pip install -e .- Create a
.envfile in the project root with your configuration:
BINANCE_API_KEY=your_api_key
BINANCE_API_SECRET=your_api_secret
TELEGRAM_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
TRADING_MODE=balanced # Options: safe, balanced, aggressive
FIXED_USDT_BALANCE=100 # Set your desired fixed trading amount in USDTRun the bot:
python -m autrade.mainThe bot can be configured through environment variables:
TRADING_MODE: Trading strategy aggressiveness (safe, balanced, aggressive)BINANCE_API_KEY: Your Binance API keyBINANCE_API_SECRET: Your Binance API secretTELEGRAM_TOKEN: Your Telegram bot tokenTELEGRAM_CHAT_ID: Your Telegram chat IDFIXED_USDT_BALANCE: Set a fixed USDT balance for trading (e.g., "100" for 100 USDT). This helps manage risk by limiting the trading amount regardless of your total balance.
Example .env configuration:
BINANCE_API_KEY=your_api_key
BINANCE_API_SECRET=your_api_secret
TELEGRAM_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
TRADING_MODE=balanced # Options: safe, balanced, aggressive
FIXED_USDT_BALANCE=100 # Set your desired fixed trading amount in USDT-
Safe Mode
- Leverage: 1x
- Take Profit: 0.5%
- Stop Loss: 0.3%
-
Balanced Mode
- Leverage: 10x
- Take Profit: 1.0%
- Stop Loss: 0.5%
-
Aggressive Mode
- Leverage: 25x
- Take Profit: 0.6%
- Stop Loss: 0.3%
- Maximum spread: 0.15%
- Maximum consecutive losses: 3
- Maximum daily trades: 10
- Minimum ATR ratio: 0.5%
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.


