dr-manhattan is an open-source unified API for prediction markets, designed to function like CCXT does for cryptocurrency exchanges. It enables developers to build applications that can trade, analyze, and perform market-making across multiple prediction market platforms through a single, consistent interface. The product is built for developers seeking to interact with prediction markets programmatically, offering a simple, scalable, and easy-to-extend foundation for their projects.
Prediction markets are platforms where users can trade on the outcomes of future events, but each platform typically has its own unique API, making it cumbersome for developers to build applications that work across multiple exchanges. dr-manhattan solves this fragmentation problem by providing a unified interface, allowing developers to write exchange-agnostic code that works seamlessly across various prediction market platforms. This standardization reduces development time and complexity, enabling more efficient trading and analysis workflows.
A key feature is the unified interface, which allows developers to write code once and deploy it across supported exchanges like Polymarket, Kalshi, Opinion, and Limitless. This means functions for fetching markets, managing orders, and accessing data are consistent, eliminating the need to learn and implement different APIs for each platform. The API supports initialization of any exchange with the same interface, simplifying integration and maintenance.
The product includes WebSocket support for real-time market data streaming, providing built-in connections for live orderbook and trade updates. This enables developers to build responsive applications that react instantly to market changes, enhancing trading strategies and user experiences with up-to-the-minute information.
It offers a strategy framework with a base class for building trading strategies, complete with order tracking, position management, and event logging. This structured approach helps developers implement and test automated trading systems efficiently, ensuring robust and manageable strategy execution across different prediction markets.
dr-manhattan is easily extensible, allowing developers to add new exchanges by implementing abstract methods. Its clean architecture makes integration straightforward, encouraging community contributions and adaptation to emerging platforms. This flexibility ensures the API can evolve with the prediction market ecosystem.
admin
The codebase is type safe with full type hints throughout, helping developers catch errors early and enjoy superior IDE autocomplete. This enhances code reliability and developer productivity, reducing bugs and streamlining the development process for prediction market applications.
Order management is standardized, enabling developers to create, cancel, and track orders with consistent error handling across all supported exchanges. This uniformity simplifies trading operations and improves error resilience, making it easier to manage transactions programmatically.
Overall, dr-manhattan works by providing a common abstraction layer over multiple prediction market APIs, allowing developers to interact with various platforms using a single set of methods. Its unique approach mirrors the CCXT model for cryptocurrencies, applying it to prediction markets to unify a fragmented landscape. The methodology involves defining exchange-agnostic functions and data structures that map to platform-specific implementations, ensuring compatibility and ease of use.
Benefits for users include reduced development overhead, as they can write and maintain one codebase for multiple exchanges instead of several. Developers gain scalability, as the unified interface supports building applications that can easily adapt to new platforms. The open-source nature fosters community collaboration and transparency, while the type safety and strategy framework enhance code quality and trading efficiency.
Use cases include building trading bots that execute strategies across multiple prediction markets simultaneously, leveraging arbitrage opportunities or hedging positions. Developers can create analytics dashboards that aggregate data from different platforms, providing comprehensive insights into market trends and event probabilities. Market makers can use the API to manage liquidity and orders programmatically across exchanges, optimizing their operations. Researchers can automate data collection and analysis from various prediction markets for academic or commercial studies.
Target users are developers, traders, and researchers working with prediction markets, particularly those who need to interact with multiple platforms programmatically. Integrations include supported exchanges like Polymarket, Kalshi, Opinion, Limitless, and Predict.fun. The tech stack is Python-based, with installation via tools like uv, and the project is hosted on GitHub for open-source collaboration. Pricing and plan details are not explicitly stated, as it is an open-source tool.
In summary, dr-manhattan delivers a unified API that simplifies and standardizes interaction with prediction markets, empowering developers to build scalable applications with reduced complexity and enhanced efficiency across multiple platforms.
Target users are developers, traders, and researchers working with prediction markets who need to interact with multiple platforms programmatically. This includes those building trading bots, analytics tools, or market-making systems, as well as academic or commercial researchers collecting data. The product is designed for Python developers seeking a unified, scalable API to simplify integration with exchanges like Polymarket, Kalshi, Opinion, and Limitless.
Updated 2026-02-28