




CCXT for prediction markets. Simple, scalable, and easy to extend.
Write exchange-agnostic code that works across all prediction markets
import dr_manhattan # Initialize any exchange with the same interface polymarket = dr_manhattan.Polymarket({'timeout': 30}) opinion = dr_manhattan.Opinion({'timeout': 30}) limitless = dr_manhattan.Limitless({'timeout': 30}) # Fetch markets from any platform markets = polymarket.fetch_markets() for market in markets: print(f"{market.question}: {market.prices}")
Everything you need to build prediction market applications
One API to rule them all. Write code once and deploy across Polymarket, Kalshi, Opinion, and Limitless.
Real-time market data streaming with built-in WebSocket connections for live orderbook and trade updates.
Base class for building trading strategies with order tracking, position management, and event logging.
Add new exchanges by implementing abstract methods. Clean architecture makes integration straightforward.
Full type hints throughout the codebase. Catch errors early and enjoy superior IDE autocomplete.
Create, cancel, and track orders with standardized error handling across all supported exchanges.
Install with uv and start building
uv pip install -e git+https://github.com/guzus/dr-manhattan