Multi-Pairs Martingale Trading Bot for Binance Exchange

·

Overview

This multi-pairs martingale trading bot is designed for Binance exchange, supporting both spot and futures markets. Currently, it only implements long-position martingale strategies for strong-performing cryptocurrencies.

Important Note: Always test the code thoroughly before deployment. Conduct your own research as profitability is not guaranteed. The developers assume no responsibility for trading outcomes.

Installation Guide

Prerequisites

  1. Install Python 3.9+ (Anaconda recommended for environment management)
  2. Create a dedicated Python environment:
conda create -n mytrader python==3.9
conda activate mytrader

Setup Process

  1. Download and extract the bot files
  2. Navigate to the project directory
  3. Install dependencies:
pip install -r requirements.txt

Alternative manual installation:

pip install requests==2.29.0 apscheduler==3.10.1 pandas numpy

Configuration

Modify config.json (use config-example.json as template) with these parameters:

ParameterDescriptionExample Values
platformExchange typebinance_spot or binance_future
api_keyBinance API keyYour exchange API key
max_pairsMaximum concurrent trades4
pump_pct1-hour price surge threshold0.026 (2.6%)
initial_trade_valueBase order size200 USDT
trade_value_multiplierMartingale coefficient1.5

See complete configuration details

Execution

nohup python -u main.py > nohup_log.out 2>&1 &

👉 Recommended cloud server provider

Key Features

  1. Dynamic Pair Selection: Identifies strong performers through:

    • 1-hour price surges (pump_pct)
    • 4-hour breakouts (pump_pct_4h)
  2. Risk Management:

    • Configurable stop-loss (stop_loss_pct)
    • Profit-taking rules (exit_profit_pct)
    • Position sizing controls
  3. Custom Filters:

    • Blocklist/unwanted pairs (blocked_lists)
    • Allowlist/approved pairs (allowed_lists)

Best Practices

  1. For spot trading: Maintain BNB balance for fee discounts
  2. Monitor server resources during extended runs
  3. Start with small trade values to test strategy performance

FAQ

What's the minimum account balance needed?

This depends on your initial_trade_value and max_pairs settings. For 4 pairs at $200 each, maintain at least $800 + buffer for volatility.

How often does the bot rebalance?

The strategy evaluates opportunities hourly based on price movements, but will maintain positions until exit conditions are met.

Can I run this alongside other strategies?

Yes, but ensure sufficient capital allocation and monitor for potential conflicts in order execution.

👉 Get started with crypto trading

Configuration Parameters

Detailed explanation of all config.json settings:

  1. Platform Selection

    • binance_spot for spot trading
    • binance_future for derivatives
  2. Trade Execution

    • taker_price_pct: Sets aggressiveness of orders (0.005 = 0.5% slippage allowance)
  3. Risk Controls

    • max_increase_pos_count: Limits martingale cycles
    • turnover_threshold: Minimum liquidity requirement ($100,000 default)

Support

For technical assistance:

Remember: Cryptocurrency trading involves substantial risk. Only use funds you can afford to lose.