Overview
HypeTradoor is a fully autonomous trading bot I built from scratch for the Hyperliquid perpetuals market. It combines classical multi-timeframe technical analysis with an LLM approval layer — the bot screens markets, generates signals, then asks an AI model to review and approve each trade before execution. All of this runs headlessly on a VPS with a real-time terminal dashboard.
The project started as a personal experiment in systematic trading and grew into a production-grade system with paper trading, risk management, daily learning, and Telegram control.
Stack
| Layer | Tech |
|---|---|
| Language | Python 3.11+ |
| Exchange | Hyperliquid (perpetuals via REST + WebSocket) |
| TUI Dashboard | Textual |
| Indicators | Pure pandas/numpy (no TA-lib dependency) |
| LLM | OpenAI-compatible (DeepSeek, MiniMax, Claude, GPT-4o) |
| Database | SQLite via aiosqlite |
| Notifications | Telegram Bot API |
| Deployment | Linux VPS, systemd |
Architecture
┌─────────────────────────────────────────────────────┐
│ Trading Loop (1h candle) │
│ │
│ DataFeed ──► Screener ──► LLM Select │
│ (WS + REST) (30 pairs) (pick best) │
│ │ │
│ HTF Bias (4H) │
│ MTF Confluence (1H) │
│ LTF Confirmation (15M) │
│ │ │
│ LLM Final Approve │
│ │ │
│ Executor ──► Trade Logger │
│ (paper/live) (SQLite) │
└─────────────────────────────────────────────────────┘
Signal Pipeline
- Screener — fetches top 30 pairs by 24h volume, applies hard filters (volume, spread, candle availability), then scores each pair on trend, momentum, and volatility using pure-pandas indicators
- LLM Pair Selection — sends top 3 candidates to an LLM with full technical context; model picks the best setup or passes the cycle
- HTF Bias (4H) — validates directional alignment on the 4-hour timeframe; soft mismatch allowed with high LLM confidence
- MTF Confluence (1H) — mandatory checks (EMA alignment, RR, funding) + scored checks (ADX, volume spike, RSI zone, structure) — minimum score of 5/12 required
- LTF Confirmation (15M) — waits for a candle break + body/volume confirmation before committing
- LLM Final Approval — second LLM call with signal details, entry/SL/TP, and account context; must approve with ≥55% confidence
Features
Multi-Strategy Engine
Five built-in strategies switchable at runtime (TUI keypress or Telegram command):
| Strategy | Leverage | Risk/Trade | Min RR | Notes |
|---|---|---|---|---|
| Trend Pullback | 5x | 0.75% | 2.0 | Default. EMA200 bias + VWAP pullback + RSI reset |
| Swing | 3x | 1.5% | 1.5 | Balanced. Multi-timeframe confluence |
| Scalping | 5x | 1.0% | 1.5 | Fast entry, tight SL |
| Conservative | 2x | 0.5% | 2.0 | Capital preservation, high confidence only |
| Degen | 10x | 3.0% | 1.3 | High leverage, far TP |
| Auto | — | — | — | Selects strategy based on ADX, ATR, volatility, momentum |
Indicators (pure pandas/numpy)
- EMA 9/21/50/200 + alignment detection
- ADX 14 + trend strength
- RSI 14 + zone classification
- MACD + histogram direction + crossover detection
- ATR 14 (used for SL/TP sizing)
- Bollinger Bands + squeeze detection
- VWAP (rolling 24h)
- Volume ratio + spike detection
- Market structure (HH/HL, LH/LL)
- Above/below EMA200 bias flag
Risk Management
- Per-trade risk sizing (% of balance × leverage)
- Daily loss limit halt
- Emergency stop (balance < 20% of starting)
- Consecutive loss cooldown
- Max open positions guard
- Daily trade count cap (per strategy)
Daily Learning Engine
Every day at 23:50 UTC, the bot reviews its own trading history:
- Queries all trades, signals, and LLM decisions from that day
- Sends a structured prompt to the LLM asking for analysis: what worked, what failed, which indicators were reliable, what to avoid
- Saves the learning note to SQLite +
data/learning/YYYY-MM-DD.json - Injects the last 7 days of notes into every future LLM prompt as memory
This creates a feedback loop where the bot gradually becomes more calibrated to current market conditions.
Telegram Control
Full bot management from Telegram:
/menu— inline keyboard with strategy selector and pause/resume/status— live account status, strategy, positions/strategy <mode>— switch strategy mid-session/set leverage 5— override any trading parameter/manual ETH LONG 1.0 2.0— queue a manual trade (SL%, TP%)/confirm//cancel— execute or abort pending manual trade- Rich notifications: signal emitted, LLM decision, trade open, TP/SL hit, daily summary
TUI Dashboard (Textual)
Six live-updating panels:
- Account — balance, PnL, win rate, risk status
- Strategy — active strategy with parameters
- Screener — last scan results with bias, score, trend/momentum
- Signal — current signal in progress with all check results
- Activity Log — color-coded real-time bot activity (ring buffer, 200 lines)
- Recent Trades — last 8 closed trades with outcome and PnL
Technical Highlights
- Zero TA-lib dependency — all indicators implemented in pure pandas/numpy, runs on any Python environment without native library compilation
- Robust LLM JSON parsing — multi-strategy extractor handles: markdown fences, trailing prose, MiniMax thinking+answer pattern (two JSON objects), BOM characters, null values
- Rate limit resilience — backfill uses semaphore-limited requests;
_post()has exponential backoff on 429;metaAndAssetCtxsshared cache serves all pairs from one API call per 30s - Provider auto-detection —
json_objectformat tested on first call; if provider returns empty content, permanently switches to plain-mode with explicit JSON instruction injected into system prompt - Async-first — fully async using
asyncio; Telegram polling, WebSocket feed, trading loop, position monitor, learning generator, and daily summary all run as concurrent tasks without threads
Configuration
All trading parameters are overridable via .env without touching config.yaml:
STRATEGY_MODE=trend_pullback
LEVERAGE=5
RISK_PER_TRADE_PCT=0.75
MAX_DAILY_LOSS_PCT=3.0
MIN_RISK_REWARD=2.0
UNIVERSE_TOP_N=30
LLM_MODEL=deepseek/deepseek-v4-flash
LLM_BASE_URL=https://api.tokenrouter.com/v1
Status
Currently running in paper trading mode on VPS. Signal generation is live and tested — the bot consistently finds 2–5 candidates per hourly candle across the top 30 Hyperliquid perpetual pairs.
Live trading activation pending manual review of paper trading performance.