reason-machines/trending-skills1 file

Binance Futures Signal Bot

Professional automated trading bot for Binance, Bybit, and OKX Futures with multi-strategy engine, Telegram/TradingView signal integration, and real-time P&L dashboard.

Specification
Skill ID
reason-machines/trending-skills/binance-futures-signal-bot
Publisher
reason-machines
Repository
trending-skills
Installs
0
Files
1
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

reason-machines/trending-skills/binance-futures-signal-botInstalls these files
  • SKILL.md

What this skill tells the agent

Binance Futures Signal Bot

Skill by ara.so — Daily 2026 Skills collection.

Automated trading bot for Binance, Bybit, and OKX Futures markets. Receives signals from Telegram channels, TradingView webhooks, or custom APIs, then executes trades with configurable leverage, dynamic position sizing, trailing stop-loss, and a real-time P&L terminal dashboard.


Installation

git clone https://github.com/Whit1985/Binance-Futures-Signal-Bot.git
cd Binance-Futures-Signal-Bot
pip install -r requirements.txt

Or via the interactive menu:

python main.py   # choose option 1 → Install Dependencies

Required Python: 3.10+

Key dependencies:

PackagePurpose
richTerminal UI / dashboards
python-binanceBinance REST & WebSocket
ccxtUnified multi-exchange interface
pandasOHLCV data & indicators
taTechnical analysis (RSI, MACD, BB, EMA)
websocketsReal-time market streams
cryptographySecure key storage

Quick Start

python main.py

Interactive menu options:

1 → Install Dependencies
2 → Settings (API keys, exchange, leverage)
3 → About
4 → Connect Signal Source (Telegram / TradingView / API)
5 → Start Auto Trading
6 → Strategy Configuration
7 → Position Manager (view & close positions)
8 → P&L Dashboard
0 → Exit

Windows:

run.bat

Linux / macOS:

chmod +x run.sh && ./run.sh

Configuration

config.json (full reference)

{
  "exchange": "binance",
  "api_key": "",
  "api_secret": "",
  "testnet": false,
  "leverage": 10,
  "max_position_pct": 5.0,
  "trailing_stop_pct": 1.5,
  "signal_source": "telegram",
  "telegram_bot_token": "",
  "telegram_channel_id": "-100XXXXXXXXXX",
  "tradingview_webhook_port": 8080,
  "strategies": {
    "ema_crossover":     {"enabled": true,  "fast": 9,  "slow": 21},
    "rsi_divergence":    {"enabled": true,  "period": 14, "overbought": 70, "oversold": 30},
    "bollinger_breakout":{"enabled": false, "period": 20, "std_dev": 2.0},
    "macd_momentum":     {"enabled": true,  "fast": 12,  "slow": 26, "signal": 9}
  },
  "pairs": ["BTCUSDT", "ETHUSDT", "SOLUSDT"],
  "risk_management": {
    "max_open_positions": 5,
    "max_daily_loss_pct": 3.0,
    "stop_loss_pct": 2.0,
    "take_profit_pct": 4.0
  }
}

Environment Variables (preferred for secrets)

export BINANCE_API_KEY="your_api_key_here"
export BINANCE_API_SECRET="your_api_secret_here"
export BYBIT_API_KEY="your_bybit_key"
export BYBIT_API_SECRET="your_bybit_secret"
export OKX_API_KEY="your_okx_key"
export OKX_API_SECRET="your_okx_secret"
export OKX_PASSPHRASE="your_okx_passphrase"
export TELEGRAM_BOT_TOKEN="your_telegram_bot_token"

Never commit config.json with real keys — it is .gitignored by default.


Exchange Setup

Binance Futures

# config.py usage pattern
import os
import json

config = {
    "exchange": "binance",
    "api_key": os.environ.get("BINANCE_API_KEY"),
    "api_secret": os.environ.get("BINANCE_API_SECRET"),
    "testnet": True,   # always test first
    "leverage": 5,
    "pairs": ["BTCUSDT", "ETHUSDT"]
}

with open("config.json", "w") as f:
    json.dump(config, f, indent=2)

Bybit Perpetual

{
  "exchange": "bybit",
  "api_key": "",
  "api_secret": "",
  "leverage": 5,
  "pairs": ["BTCUSDT", "ETHUSDT"]
}

OKX Perpetual Swap

{
  "exchange": "okx",
  "api_key": "",
  "api_secret": "",
  "okx_passphrase": "",
  "leverage": 5,
  "pairs": ["BTC-USDT-SWAP", "ETH-USDT-SWAP"]
}

Signal Sources

1. Telegram Channel

# Setup steps:
# 1. Create bot at https://t.me/BotFather → get token
# 2. Add bot to signal channel as admin
# 3. Get channel ID (negative number starting with -100)

config_snippet = {
    "signal_source": "telegram",
    "telegram_bot_token": os.environ.get("TELEGRAM_BOT_TOKEN"),
    "telegram_channel_id": "-1001234567890"
}

2. TradingView Webhook

{
  "signal_source": "tradingview",
  "tradingview_webhook_port": 8080
}

TradingView alert message format (JSON):

{
  "symbol": "BTCUSDT",
  "side": "BUY",
  "leverage": 10,
  "price": "{{close}}",
  "strategy": "ema_crossover"
}

Point your TradingView alert webhook URL to:

http://YOUR_SERVER_IP:8080/webhook

3. Custom API Signal Source

{
  "signal_source": "api",
  "custom_api_url": "https://your-signal-provider.com/signals",
  "custom_api_key": ""
}

Strategies

EMA Crossover

{
  "ema_crossover": {
    "enabled": true,
    "fast": 9,
    "slow": 21
  }
}
  • LONG: fast EMA crosses above slow EMA
  • SHORT: fast EMA crosses below slow EMA
  • Best timeframes: 15m, 1h, 4h

RSI Divergence

{
  "rsi_divergence": {
    "enabled": true,
    "period": 14,
    "overbought": 70,
    "oversold": 30
  }
}
  • Bullish: price lower lows + RSI higher lows → LONG
  • Bearish: price higher highs + RSI lower highs → SHORT

Bollinger Band Breakout

{
  "bollinger_breakout": {
    "enabled": true,
    "period": 20,
    "std_dev": 2.0
  }
}
  • LONG: close above upper band
  • SHORT: close below lower band

MACD Momentum

{
  "macd_momentum": {
    "enabled": true,
    "fast": 12,
    "slow": 26,
    "signal": 9
  }
}
  • Trades histogram crossovers with signal line confirmation
  • Zero-line acts as trend filter

Running Multiple Strategies

All enabled strategies run per candle. The bot takes the highest-confidence signal and filters conflicts:

{
  "strategies": {
    "ema_crossover":      {"enabled": true,  "fast": 9,  "slow": 21},
    "rsi_divergence":     {"enabled": true,  "period": 14},
    "bollinger_breakout": {"enabled": false},
    "macd_momentum":      {"enabled": true}
  }
}

Risk Management

{
  "leverage": 10,
  "max_position_pct": 5.0,
  "trailing_stop_pct": 1.5,
  "risk_management": {
    "max_open_positions": 5,
    "max_daily_loss_pct": 3.0,
    "stop_loss_pct": 2.0,
    "take_profit_pct": 4.0
  }
}
ParameterDescription
leverage1x–125x (start with 2–5x)
max_position_pct% of account balance per trade
trailing_stop_pctTrailing SL activates after price moves this % in profit
max_open_positionsHard cap on concurrent open trades
max_daily_loss_pctBot halts trading if daily loss exceeds this
stop_loss_pctFixed stop-loss distance from entry
take_profit_pctFixed take-profit distance from entry

Trailing stop-loss behavior: Once position is in profit by trailing_stop_pct, the stop follows the peak price. Position closes automatically on reversal of that distance.


Testnet Mode

Always validate on testnet before live trading:

{
  "testnet": true,
  "exchange": "binance"
}

Binance testnet: https://testnet.binancefuture.com Bybit testnet: https://testnet.bybit.com


Project Structure

Binance-Futures-Signal-Bot/
├── main.py              # Entry point — interactive menu
├── bot_actions.py       # Core trading action handlers
├── config.py            # Configuration loader (JSON + env vars)
├── requirements.txt
├── run.bat / run.sh     # Platform launchers
├── actions/
│   ├── about.py         # Feature display
│   ├── install.py       # Dependency installer
│   └── settings.py      # Configuration UI
├── utils/
│   ├── __init__.py      # Environment bootstrap
│   ├── compat.py        # Platform compatibility
│   ├── ui.py            # Rich terminal interface
│   ├── http.py          # HTTP client
│   ├── integrity.py     # Data integrity checks
│   └── bootstrap.py     # Runtime initialization
└── release/
    └── README.md        # Pre-compiled binary info

Common Patterns

Load Config Programmatically

import json
import os

def load_config(path="config.json"):

Use this skill in a project

Open any RiverX project, search the Skills panel for reason-machines/trending-skills/binance-futures-signal-bot, and install it in one click.

Use this skill