Moon Dev Trading Tutorials

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

Quick Start: Which Tutorial Should I Read First?

1.

Never traded crypto? Start with Tutorial 02 (Funding Scanner) - it's read-only and teaches key concepts.

2.

Want something fun? Try Tutorial 11 (Whale Scanner) - watch big trades live with just 2 pip installs.

3.

Interested in ML? Go to Tutorial 08 (XGBoost) for a complete machine learning pipeline.

4.

Want to backtest? Start with Tutorial 06 (MACD Backtest) - no API keys needed.

Recommended Learning Path

Tutorial 11: Whale Scanner
Easiest to run. No API keys. Teaches WebSocket basics and real-time data.
Tutorial 02: Funding Rate Scanner
Learn about funding rates, perpetual futures, and data display. Read-only tool.
Tutorial 10: Weather Scanner
No API keys. Teaches web scraping, API calls, and data comparison.
Tutorial 06: MACD Backtest
First step into strategy testing. Historical data only, no real money.
Tutorial 07: MACD Histogram Filter
Learn parameter optimization and signal filtering.
Tutorial 08: XGBoost ML Model
Complete machine learning pipeline. Feature engineering, training, evaluation.
Tutorial 04: 5-Minute Bot
First live trading bot. Keyboard-driven, simple, fun.
Tutorial 05: CVD Bot
Advanced order flow analysis with stink bids and hedging.
Tutorial 03: Stat Arb Bot
Multi-platform arbitrage with liquidation signals.
Tutorial 01: HIP-3 Liquidation Bot
Most complex bot. Real-world asset liquidation trading on Hyperliquid.
Tutorial 09: Redemption Bot
Utility tool. Batch smart contract interactions and gas optimization.

Hyperliquid Tutorials

Hyperliquid is a decentralized exchange for perpetual futures. These tutorials cover its features including HIP-3 tokenized real-world assets.

Polymarket Trading Bots

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.

Backtesting & Machine Learning

Test strategies on historical data before risking real money. These tutorials teach strategy development, optimization, and ML model building.

Tools & Utilities

Utility scripts for managing positions, redeeming winnings, and monitoring market activity.

Key Concepts Across All Tutorials

Polymarket

Prediction market platform on Polygon. Binary options on real-world events including BTC 5-minute price movements.

Hyperliquid

Decentralized exchange for perpetual futures. HIP-3 adds real-world assets like oil, gold, and stocks.

Stink Bid

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."

Breakeven: 54%

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.

Hedging

Placing an offsetting position (usually 40% on Hyperliquid) to reduce risk. If Polymarket loses, the hedge gains.

Backtesting

Testing a strategy on historical data. Tutorials 06, 07, and 08 are backtest-only. Always backtest before live trading.

Pseudo-Code Translations

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.

Disclaimer

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.