Prediction market trading bot. Connects to Kalshi (Polymarket planned), reconstructs portfolio from trade history, and will eventually run Avellaneda-Stoikov market-making.
Phase 1 complete — read-only Kalshi integration with live portfolio tracking.
uv sync
cp .env.example .env # add your Kalshi API credentialspython -m atreides markets # list active markets
python -m atreides book <ticker> # show orderbook
python -m atreides watch <ticker> # stream price updates
python -m atreides balance # portfolio + P&Lsrc/atreides/
config.py # pydantic-settings, env vars
models.py # Market, OrderBook, Position, Order types
cli.py # rich terminal UI
exchange/
base.py # Exchange protocol (structural typing)
kalshi.py # Kalshi SDK adapter + raw API fallback
strategy/
base.py # Strategy protocol (Phase 4)
risk.py # Position limits, loss limits, kill switch (Phase 3)
Exchange abstraction lets the same strategy run on any platform. Portfolio reconstruction works around Kalshi SDK gaps (empty get_positions(), missing status enums).
Foundation + Kalshi read-onlydone- Data collection + volatility estimation
- Live trading with hard risk limits ($50 max exposure)
- Avellaneda-Stoikov market making
- Polymarket + cross-exchange arbitrage
MIT