Skip to content

Repository files navigation

WhuffoBot 🪂

The name comes from skydiving. A whuffo is the person standing on the ground asking "why would you jump out of a perfectly good airplane?"

Same energy. Different risk.

Maybe now it's your turn to jump.

Automated perpetual futures trading bot for Hyperliquid DEX. Scans all available pairs every 15 minutes and opens positions based on the strongest signal found.

AI agents working on this codebase should read AGENTS.md before making changes.


Results

Period Mode Return
Nov–Dec 2024 (Bull Run) Backtest +84.6%
90-day sideways/bear market Backtest +13.6%

How It Works

The bot runs two strategies simultaneously:

Trend (4h) — primary strategy Scans all Hyperliquid pairs and picks the one with the strongest signal:

  • Long: fast EMA crosses above slow EMA + RSI ≥ 50 + ADX ≥ 25
  • Short: fast EMA crosses below slow EMA + RSI ≤ 50 + ADX ≥ 25

Scalp (5m) — secondary, very selective

  • Bollinger Band squeeze breakout + volume spike + RSI extreme + VWAP deviation

Signal Amplifiers

Each amplifier increases leverage by +1 (range: 2x–7x trend, 5x–10x scalp):

  • Open Interest increasing in signal direction
  • BTC moving in same direction
  • Funding rate favorable
  • Liquidation cascade nearby in our favor
  • Top 5 Hyperliquid whale traders positioned in same direction

Veto Conditions

Any of these cancels the signal entirely:

  • Funding rate working against us
  • OI suddenly collapsing
  • BTC making a sharp move in opposite direction
  • Price too close to a support/resistance level

Risk Management

  • Stop loss: 2% / Take profit: 4%
  • At TP1 (4%): close 50%, move SL to breakeven, continue with trailing stop
  • Reverse EMA crossover: close remaining position immediately
  • Scalp positions: forced close after 60 minutes
  • Max drawdown 25%: bot pauses opening new positions

Additional Systems

  • Regime detector: monitors BTC trend (EMA200 + ADX) — adjusts leverage and blocks shorts during bull runs
  • Learner system: tracks win rate per signal type, rejects signals with historically low performance

Requirements

Python 3.10+
pip install -r requirements.txt

Setup

cp config.example.py config.py
# Fill in your keys in config.py
python main.py

Start with MODE = "PAPER" to test without real funds before going live.

Config

HL_PRIVATE_KEY    = "0x..."   # Hyperliquid API wallet private key
HL_WALLET_ADDRESS = "0x..."   # Your main wallet address
MODE              = "PAPER"   # PAPER or LIVE
TELEGRAM_TOKEN    = ""        # Optional — trade alerts
TELEGRAM_CHAT_ID  = ""        # Optional

Get your Hyperliquid API key: app.hyperliquid.xyz → Settings → API Wallet → Generate

WhuffoBot uses Binance as a data source for OHLCV, open interest and funding rate data. No Binance account or API key required — public endpoints only.

Running

# Start
python main.py

# Background (recommended)
nohup python main.py &

# Monitor logs
tail -f whuffobot.log

Telegram Notifications

Add your token and chat ID to config.py to enable trade alerts.

You will receive a message on every:

  • Position opened (symbol, direction, leverage, entry price)
  • TP1 hit — 50% closed, stop loss moved to breakeven
  • Position closed (reason: TP, SL, trailing stop, or EMA crossover)
  • Bot restart (watchdog)

Auto-Start

Mac (launchd)

# Create a plist file in ~/Library/LaunchAgents/
# Set ProgramArguments to: python /path/to/main.py
launchctl load ~/Library/LaunchAgents/whuffobot.plist

Linux (systemd)

# Create /etc/systemd/system/whuffobot.service
# Set ExecStart to: python /path/to/main.py
systemctl enable whuffobot
systemctl start whuffobot

License

MIT License — see LICENSE for details.


Disclaimer

This is not financial advice. Trading involves significant risk of loss. Use at your own risk. 🪂


Buy Me a Parachute 🪂

WhuffoBot helped you land a trade?

0x425e5A6f592f8B64B2381F392b3A1f586DeaeF59

About

Automated perpetual futures trading bot for Hyperliquid DEX

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages