Best Prediction Market APIsbuilder's guide · 2026 Open Kairos

Aggregatorslibraryfree

dr-manhattan: what it does, what it costs, where it stops

Last checked 2026-09-08

VenuesPolymarket + Kalshi + Opinion + 2 more
PricingOpen source (MIT).
Typelibrary
GitHub stars199

dr-manhattan is an open-source, CCXT-style unified Python library for prediction markets covering Polymarket, Kalshi, Opinion, Limitless and Predict.fun. It has 199 GitHub stars, an MIT license in its pyproject, and was last pushed July 18, 2026. Community ports exist in TypeScript (gtg7784/dr-manhattan-ts, 56 stars, npm @alango/dr-manhattan) and Rust (54 stars).

It is for developers who want a lightweight abstraction they can read in an afternoon and extend, not a hosted service. There is no API key, no server and no pricing.

What it does

Every venue implements the same Exchange base class: fetch markets, create and cancel orders, query positions and balances, and WebSocket streaming where implemented. A Strategy base class with on_tick, log_status and place_bbo_orders helpers, plus an order tracker, are included for building bots on top.

An exchange factory creates instances by name (create_exchange('polymarket')) from environment credentials, or read-only with validate=False. The Polymarket implementation is split into CLOB, Gamma, Data, CTF, WebSocket, Builder and Operator modules.

Authenticated use takes a dict per venue: Polymarket wants private_key and funder, Opinion wants api_key, private_key and multi_sig_addr, Limitless wants private_key, and Predict.fun supports a smart wallet with an owner key and wallet address. The MCP server reads POLYMARKET_PRIVATE_KEY and POLYMARKET_FUNDER from .env and registers in Claude Code's .mcp.json.

  • Venues: Polymarket (Polygon), Opinion and Predict.fun (BNB Chain), Limitless (Base), Kalshi.
  • MCP server for Claude Desktop and Claude Code, installed with the mcp extra via uv sync.
  • Install: uv venv then uv pip install -e . from a clone. Python 3.11+ per pyproject.

Pricing

Free under MIT. The PyPI package dr-manhattan is at 0.0.1 from December 7, 2025 while pyproject.toml reads 0.0.2, so pip will give you a stale build; install from the repo. The exchange factory validates credentials by default and skips validation when you ask for a read-only instance.

Venues and data

Five venues. The exchanges directory carries WebSocket modules for Polymarket, Limitless and Predict.fun and none for Kalshi or Opinion, and the TypeScript port's table marks WebSocket as unsupported for those two.

Data is whatever the venue APIs return live; there is no historical store or hosted catalog. A DeepWiki badge in the README links a generated walkthrough of the codebase.

Where it falls short

No hosted layer means no cross-venue search, no matched markets and no shared history, all of which PMXT sells. Coverage is five venues against PMXT's 15 and CCXT's 7.

The stale PyPI release and a single primary maintainer make it a fork-and-own dependency rather than a pinned one.

Who should use it

Python developers who want to own their venue adapters and prefer a 199-star codebase they can audit over a hosted API with escrow.

For breadth or for TypeScript with a maintained npm release, PMXT is the safer default.

Questions about dr-manhattan

Is dr-manhattan free?

Yes. It is MIT licensed and installed from source; the PyPI release is outdated.

Does dr-manhattan support Kalshi?

Yes for REST. There is no Kalshi WebSocket module in the repo.

Is there a TypeScript version of dr-manhattan?

Yes. gtg7784/dr-manhattan-ts (56 stars) publishes @alango/dr-manhattan on npm and covers the same five venues.

read the docshandle authmatch marketsexecute

Official APIs for building. One book for trading.

Rather trade the spread than build the plumbing? The free Kairos terminal gives you Kalshi, Polymarket and Predict.fun in one order book.