If you've ever wished for a hands-off way to trade crypto futures without staring at charts all day, you're in for a treat. Passivbot is an open-source trading bot that runs on Bybit, OKX, Bitget, GateIO, Binance, KuCoin, and Hyperliquid—basically covering all the major exchanges where serious traders operate.
What makes this bot different? It doesn't pretend to predict the future or chase trends. Instead, it acts like a contrarian market maker, placing orders that provide resistance to price swings in both directions. Think of it as the calm person in a panicked crowd, buying when others sell and selling when others buy.
The bot's strategy is inspired by the Martingale betting system, but adapted for crypto trading. Here's the basic idea: it starts with a small position, then doubles down on losing trades multiple times to bring your average entry price closer to the current market price.
Orders are arranged in a grid pattern, ready to catch sudden price movements. After each re-entry, the bot immediately updates its closing orders at a profitable markup. So when the market bounces even slightly in your favor, the position closes for a profit and the cycle starts fresh.
Beyond the grid-based approach, Passivbot offers trailing entries and trailing closes. For trailing entries, the bot waits for price to move past a threshold, then retrace by a set percentage before entering. Trailing closes work similarly—waiting for favorable price movement followed by a retracement before exiting. This helps lock in profits when the market shows reversal signals instead of exiting at a fixed distance from your entry price.
When managing multiple positions across different trading pairs, the bot's Forager feature automatically selects the most volatile markets to open positions on. It calculates volatility as the mean normalized relative range of recent 1-minute candles, essentially measuring how much each candle moves relative to its closing price.
For traders looking to diversify their exchange options and maximize trading opportunities, 👉 exploring platforms like KuCoin that support automated trading strategies can open up access to hundreds of perpetual futures markets with competitive fees.
Every grid trading bot eventually faces the problem of stuck positions—trades that moved against you and haven't recovered. Passivbot handles this by realizing small losses over time rather than holding forever. When multiple positions are stuck, it prioritizes the ones closest to break-even for "unstucking."
The bot also includes a safety mechanism: losses are capped so your account balance never drops below a set percentage of your past peak balance. This prevents catastrophic drawdowns that could wipe out months of gains.
Getting the bot running requires a bit of technical setup, but nothing too complicated if you're comfortable with command line basics.
Clone the repository:
git clone https://github.com/enarjord/passivbot.git
cd passivbot
Install Rust (needed for the bot's performance-critical components) from the official Rust website, then create a Python virtual environment:
On Linux/macOS: python3 -m venv venv then source venv/bin/activate
On Windows: python -m venv venv then venv\Scripts\activate
Install Python dependencies:
pip install -r requirements.txt
The bot will automatically build the Rust extensions when you first run it. If you prefer building manually, navigate to the passivbot-rust directory and run maturin develop --release.
Configure your API keys by copying the template file (cp api-keys.json.example api-keys.json) and adding your exchange credentials.
Launch the bot:
python3 src/main.py -u {your_account_name}
Or create a custom configuration file based on configs/template.json and run it with the path to your config.
Before risking real money, you'll want to backtest strategies on historical data. Passivbot includes a backtester with CPU-intensive functions written in Rust for speed. There's also an optimizer that runs thousands of backtests with different settings, using an evolutionary algorithm to converge on optimal configurations.
This means you can test how a strategy would have performed over months or years of market data, then fine-tune parameters to match your risk tolerance and goals.
If you want to run several Passivbot instances on the same machine—maybe different strategies on different exchanges—that's fully supported. Each process shares the same on-disk price data cache, and the candlestick manager uses self-healing locks with automatic cleanup. Translation: one frozen process won't block the others, and you don't need to manually delete lock files.
For debugging, the bot uses Python's logging module with adjustable verbosity. Use the --debug-level flag (0 for warnings only, up to 3 for detailed trace logs) to see exactly what's happening under the hood.
Automated trading bots aren't magic money printers, but they solve real problems. They remove emotion from trading decisions, execute strategies consistently 24/7, and can manage multiple positions across exchanges simultaneously—something impossible for human traders.
Passivbot's contrarian approach means it profits from market volatility and reversals rather than requiring accurate predictions about future price direction. In choppy, range-bound markets where trend-following strategies struggle, this bot can thrive.
The fact that it's open-source also matters. You can inspect every line of code, modify the strategy to suit your needs, and benefit from community improvements. No black-box algorithms or hidden fees.
For traders ready to expand their automated trading across multiple venues, 👉 setting up accounts on exchanges like KuCoin that offer extensive API access provides the infrastructure needed to run sophisticated multi-exchange strategies.
Like any trading system, Passivbot carries risk. The grid strategy can accumulate large positions during prolonged trends against your trades. The bot includes safety mechanisms like balance drawdown limits, but extreme market moves can still cause significant losses.
You'll need Python and Rust knowledge to install and configure the bot properly. While the documentation is thorough, this isn't a plug-and-play solution for complete beginners. There's a learning curve.
That said, the Passivbot community is active on Discord and Telegram, offering support and sharing configurations. The developer continues improving the codebase, with recent updates including better logging, multi-instance support improvements, and enhanced candlestick data management.
If you're serious about automated crypto trading and willing to invest time in understanding the system, Passivbot offers a powerful, free alternative to paid trading bots. Just remember that past backtesting performance never guarantees future results, and start with position sizes you're comfortable losing while you learn how the bot behaves in live market conditions.