Beginner-friendly explanations of 11 Python trading bots and tools from Moon Dev. Each tutorial is broken down with simple analogies, step-by-step code walkthroughs, and concept explanations.
Source: moondev.com | 11 Tutorials | Python | Hyperliquid & Polymarket
Never traded crypto? Start with Tutorial 02 (Funding Scanner) - it's read-only and teaches key concepts.
Want something fun? Try Tutorial 11 (Whale Scanner) - watch big trades live with just 2 pip installs.
Interested in ML? Go to Tutorial 08 (XGBoost) for a complete machine learning pipeline.
Want to backtest? Start with Tutorial 06 (MACD Backtest) - no API keys needed.
Hyperliquid is a decentralized exchange for perpetual futures. These tutorials cover its features including HIP-3 tokenized real-world assets.
Detects liquidation cascades on Hyperliquid's tokenized asset markets (oil, gold, stocks) and auto-trades them with TP/SL. Runs every 30 seconds.
Tutorial 02Scans ALL Hyperliquid funding rates for both crypto perps and HIP-3 assets. Displays top 30 highest and most negative rates in formatted tables.
Polymarket is a prediction market platform where you can bet on real-world events. These bots trade BTC 5-minute binary markets and other outcomes.
Uses BTC liquidation data to place "stink bids" on Polymarket 5-min markets. Hedges 40% on Hyperliquid. Logs all trades to CSV.
Tutorial 04The simplest Polymarket bot. Press B to bet UP, S to bet DOWN, X to close. Colorful terminal UI with session tracking. 288 chances per day.
Tutorial 05Uses Cumulative Volume Delta divergence to detect when price and order flow disagree. Checks 1m, 3m, 5m, 10m, 15m timeframes for signals.
Test strategies on historical data before risking real money. These tutorials teach strategy development, optimization, and ML model building.
Tests whether MACD can predict BTC's 5-minute direction. Simulates Polymarket payouts. Includes parameter optimization across multiple MACD settings.
Tutorial 07Extends Tutorial 06 with histogram strength filtering. Only trades when MACD histogram exceeds a threshold. Tests multiple parameter + threshold combos.
Tutorial 08Complete ML pipeline: feature engineering from raw candle shapes (no indicators), XGBoost training, time-series split, P&L simulation, and confidence analysis.
Utility scripts for managing positions, redeeming winnings, and monitoring market activity.
Redeems winning positions across multiple Gnosis Safe accounts using batch MultiSend transactions. Handles regular and neg-risk markets. ~50% gas savings.
Tutorial 10Compares Polymarket temperature markets against real weather forecasts (Open-Meteo). Uses 51 ensemble models for probability estimation. 35+ cities. No API key needed!
Tutorial 11Live WebSocket scanner for trades $1,000+ across ALL Polymarket markets. Colorful terminal display with auto-reconnect and session statistics. Just 2 pip installs!
Prediction market platform on Polygon. Binary options on real-world events including BTC 5-minute price movements.
Decentralized exchange for perpetual futures. HIP-3 adds real-world assets like oil, gold, and stocks.
A limit order placed well below market price. Used in Tutorials 03 and 05. "I'll only buy if the price drops to my level."
With a $0.54 entry price on Polymarket, you need to win >54% of bets to profit. This is the benchmark all strategies must beat.
Placing an offsetting position (usually 40% on Hyperliquid) to reduce risk. If Polymarket loses, the hedge gains.
Testing a strategy on historical data. Tutorials 06, 07, and 08 are backtest-only. Always backtest before live trading.
Every tutorial includes a Python-to-pseudo-code section at the bottom, translating the code line-by-line into plain English so you can trace exactly what each program does.
All tutorials are for educational purposes only. They are not financial advice. Trading crypto and prediction markets involves significant risk. You can lose money. Always test with small amounts first. Past performance (including backtests) does not guarantee future results. Never invest more than you can afford to lose.