Skip to content

Hydra

Trade crypto prediction markets with edge. Latency arbitrage between Binance prices and Polymarket orderbooks.

Hydra crypto prediction markets (e.g., “BTC above $100k by Friday?”) often lag behind real-time exchange prices. This bot exploits that latency by comparing Binance spot prices to Polymarket orderbook prices, finding mispriced contracts, and executing trades with edge.

Latency Arbitrage

Compare real-time Binance prices against Polymarket orderbooks. When implied probability diverges from fair value, trade with edge.

Smart Market Discovery

Automatically find and rank the best markets to trade based on strike proximity, volume, liquidity, spread, and edge potential.

Paper Trading

Test strategies risk-free with realistic simulation. Full fee modeling, latency simulation, and fill probability.

Record & Replay

Record live market data sessions, then replay them deterministically to backtest strategies or debug behavior.

Real-time TUI Dashboard

Monitor positions, P&L, orderbook state, and strategy signals via a terminal UI. Connect to any running bot instance.

Event-Driven Architecture

All state changes flow through typed events. Full audit trail, deterministic replay, and easy strategy development.

Terminal window
# Install pre-built binary
curl -fsSL https://raw.githubusercontent.com/rnwolfe/hydra/main/scripts/install.sh | bash
# Or clone and run from source
git clone https://github.com/rnwolfe/hydra.git
cd hydra
bun install
# Configure
cp config.example.yaml config.yaml
# Run paper trading
hydra run # Binary
bun run paper # From source
CommandDescription
hydra runStart trading (paper mode by default)
hydra run --mode liveStart live trading
hydra run --mode replayReplay recorded session
hydra recordRecord market data for later replay
hydra tuiLaunch real-time dashboard
hydra latencyCheck network latency to exchanges
flowchart TB
    subgraph top["Trading Bot"]
        direction LR
        B["Binance<br/>WebSocket"]
        P["Polymarket<br/>WebSocket"]
        S["Strategy<br/>Engine"]
        E["Execution<br/>Layer"]
    end

    subgraph middle["Event Bus"]
        EB[Central Message Broker]
    end

    subgraph bottom["Infrastructure"]
        direction LR
        SS[State Store]
        RM[Risk Manager]
        PR[Persistence]
        IPC[IPC]
    end

    top --> middle
    middle --> bottom

Ready to dive in? Head to the Introduction to learn more.