Latency Arbitrage
Compare real-time Binance prices against Polymarket orderbooks. When implied probability diverges from fair value, trade with edge.
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.
# Install pre-built binarycurl -fsSL https://raw.githubusercontent.com/rnwolfe/hydra/main/scripts/install.sh | bash
# Or clone and run from sourcegit clone https://github.com/rnwolfe/hydra.gitcd hydrabun install
# Configurecp config.example.yaml config.yaml
# Run paper tradinghydra run # Binarybun run paper # From source| Command | Description |
|---|---|
hydra run | Start trading (paper mode by default) |
hydra run --mode live | Start live trading |
hydra run --mode replay | Replay recorded session |
hydra record | Record market data for later replay |
hydra tui | Launch real-time dashboard |
hydra latency | Check 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.