Pmxt
CCXT for prediction markets. PMXT is a unified API for trading on Polymarket, Kalshi, and more.
Install / Use
npx skills add pmxt-dev/pmxtInstalls into whichever agent you are using.
README
pmxt

The ccxt for prediction markets. Hosted unified API for prediction-market data and supported hosted trading — Polymarket, Opinion, and Limitless writes today. Open-source SDKs and a self-host option for venue-native credentials included.
<img width="3840" height="2160" alt="plot" src="https://github.com/user-attachments/assets/ed77d244-c95f-4fe0-a7a7-89af713c053f" /> <div align="center"> <table> <tr> <td rowspan="3"> <a href="https://www.producthunt.com/products/ccxt-for-prediction-markets?embed=true&utm_source=badge-featured&utm_medium=badge&utm_campaign=badge-ccxt-for-prediction-markets" target="_blank" rel="noopener noreferrer"><img alt="CCXT for Prediction Markets - A unified API for prediction market data across exchanges. | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1060549&theme=light&t=1768206672608"></a> </td> <td> <img src="https://img.shields.io/github/watchers/pmxt-dev/pmxt?style=social" alt="GitHub watchers"> </td> <td> <a href="https://github.com/pmxt-dev/pmxt"><img src="https://pmxt-dev.github.io/pmxt-stats/badges/total-downloads.svg" alt="Total Downloads"></a> </td> </tr> <tr> <td> <img src="https://img.shields.io/github/forks/pmxt-dev/pmxt?style=social" alt="GitHub forks"> </td> <td> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a> </td> </tr> <tr> <td> <a href="https://github.com/pmxt-dev/pmxt/stargazers"><img src="https://img.shields.io/github/stars/pmxt-dev/pmxt?refresh=1" alt="GitHub stars"></a> </td> <td> <a href="https://www.npmjs.com/package/pmxtjs"> <img src="https://img.shields.io/npm/v/pmxtjs?label=version" alt="version"> </a> </td> </tr> </table> </div> <p align="center"> <a href="https://discord.gg/Pyn252Pg95"> <img src="https://img.shields.io/discord/1461393765196501015?label=Discord&logo=discord&logoColor=white&style=for-the-badge&color=5865F2" alt="Discord"> </a> </p>Supported Exchanges
<p align="center"> <a href="https://polymarket.com" style="color: inherit; text-decoration: none;"><img src="https://polymarket.com/favicon.ico" alt="Polymarket" width="24" height="24"> <b>Polymarket</b></a> <a href="https://polymarket.us" style="color: inherit; text-decoration: none;"><img src="https://polymarket.us/favicon.ico" alt="Polymarket US" width="24" height="24"> <b>Polymarket US</b> 🇺🇸</a> <a href="https://kalshi.com" style="color: inherit; text-decoration: none;"><img src="https://kalshi.com/favicon.ico" alt="Kalshi" width="24" height="24"> <b>Kalshi</b></a> <a href="https://limitless.exchange" style="color: inherit; text-decoration: none;"><img src="https://limitless.exchange/assets/images/logo.svg" alt="Limitless" width="24" height="24"> <b>Limitless</b></a> <a href="https://probable.markets" style="color: inherit; text-decoration: none;"><img src="https://developer.probable.markets/logo.svg" alt="Probable" width="100"></a> <a href="https://baozi.bet" style="color: inherit; text-decoration: none;"><img src="https://baozi.bet/favicon.ico" alt="Baozi" width="24" height="24"> <b>Baozi</b></a> <a href="https://myriad.markets" style="color: inherit; text-decoration: none;"><img src="https://myriad.markets/favicon.ico" alt="Myriad" width="24" height="24"> <b>Myriad</b></a> <a href="https://opinion.trade" style="color: inherit; text-decoration: none;"><img src="https://app.opinion.trade/assets/apple-splash-2048-2732.jpg" alt="Opinion" width="24" height="24"> <b>Opinion</b></a> <a href="https://www.metaculus.com" style="color: inherit; text-decoration: none;"><img src="https://www.metaculus.com/favicon.ico" alt="Metaculus" width="24" height="24"> <b>Metaculus</b></a> <a href="https://smarkets.com" style="color: inherit; text-decoration: none;"><img src="https://smarkets.com/favicon.ico" alt="Smarkets" width="24" height="24"> <b>Smarkets</b></a> <a href="https://hyperliquid.xyz" style="color: inherit; text-decoration: none;"><img src="https://pmxt.dev/venues/hyperliquid.png" alt="Hyperliquid" width="24" height="24"> <b>Hyperliquid</b></a> <a href="https://gemini.com" style="color: inherit; text-decoration: none;"><img src="https://pmxt.dev/venues/gemini-titan.png" alt="Gemini Titan" width="24" height="24"> <b>Gemini Titan</b></a> <a href="https://www.suibets.com" style="color: inherit; text-decoration: none;"><img src="https://www.suibets.com/favicon.ico" alt="SuiBets" width="24" height="24"> <b>SuiBets</b></a> <a href="https://rain.one" style="color: inherit; text-decoration: none;"><img src="https://www.rain.one/favicon.png" alt="Rain" width="24" height="24"> <b>Rain</b></a> <a href="https://www.playhunch.xyz" style="color: inherit; text-decoration: none;"><img src="https://www.playhunch.xyz/favicon.ico" alt="Hunch" width="24" height="24"> <b>Hunch</b></a> </p>Why pmxt?
Different prediction market platforms have different APIs, data formats, and conventions. pmxt provides a single, consistent interface to work with all of them.
- Hosted API. Get a key at pmxt.dev/dashboard, construct a client, trade. PMXT handles custody, signing infrastructure, and on-chain settlement.
- Open source (MIT). Self-host the local server for full control — your keys, your machine, no PMXT in the loop. See Self-hosted.
- Language-agnostic. Python and TypeScript SDKs today, with HTTP access for any other language. No lock-in to a single ecosystem.
- Drop-in Dome API replacement. Automatic codemod (
dome-to-pmxt) for teams migrating after the Polymarket acquisition. - Unified trading, not just data. Hosted writes cover Polymarket, Opinion, and Limitless today; self-host for venue-native writes such as Kalshi where supported.
- MCP-native. Use pmxt directly from Claude, Cursor, and other AI agents.
Installation
Ensure that Node.js (>= 18) is installed and the node command is available on your PATH. The Python SDK requires Python >= 3.8.
Python
pip install pmxt
Node.js
npm install pmxtjs
CLI
npm install -g @pmxt/cli
pmxt polymarket markets --query Trump --limit 5
pmxt polymarket fetchMarkets --query Trump --limit 5
pmxt auth status
Running from Source
git clone https://github.com/pmxt-dev/pmxt.git
cd pmxt
npm install
npm run dev
MCP (for AI agents)
npx -y @pmxt/mcp
See @pmxt/mcp for setup with Claude, Cursor, and other MCP-compatible clients.
Migrating from Dome API
If you're currently using Dome API, pmxt is a drop-in replacement for DomeAPI's Polymarket/Kalshi workflows and also exposes PMXT's broader supported venue catalog where current capabilities exist.
Check out pmxt as a Dome API alternative for a detailed migration guide, API comparison, and automatic codemod tool (dome-to-pmxt) to help you transition your code.
# Automatically migrate your codebase
npx dome-to-pmxt ./src
Quickstart
Get your API key at pmxt.dev/dashboard. For reads, only pmxt_api_key and wallet_address are required. For trading, also pass private_key — the SDK auto-wraps it into an EIP-712 signer.
Python
import pmxt
# Reads — pmxt_api_key + wallet_address only
client = pmxt.Polymarket(
pmxt_api_key="pmxt_live_...",
wallet_address="0xYourWalletAddress",
)
positions = client.fetch_positions()
balance = client.fetch_balance()
markets = client.fetch_markets(query="nba")
# Trading — also pass private_key
trader = pmxt.Polymarket(
pmxt_api_key="pmxt_live_...",
wallet_address="0xYourWalletAddress",
private_key="0xYourPrivateKey",
)
order = trader.create_order(
market_id="market-uuid",
outcome_id="outcome-uuid",
side="buy",
order_type="market",
amount=5.0,
denom="usdc",
slippage_pct=30.0,
)
TypeScript
Import style: Use named imports such as
import { Polymarket } from "pmxtjs"for direct classes, orimport pmxt from "pmxtjs"for the namespaced form.
import { Polymarket } from "pmxtjs";
// Reads — pmxtApiKey + walletAddress only
const client = new Polymarket({
pmxtApiKey: "pmxt_live_...",
walletAddress: "0xYourWalletAddress",
});
const positions = await client.fetchPositions();
const balance = await client.fetchBalance();
// Trading — also pass privateKey
const trader = new Polymarket({
pmxtApiKey: "pmxt_live_...",
walletAddress: "0xYourWalletAddress",
privateKey: "0xYourPrivateKey",
});
const order = await trader.createOrder({
marketId: "market-uuid",
outcomeId: "outcome-uuid",
side: "buy",
type: "market",
amount: 5.0,
denom: "usdc",
slippage_pct: 30.0,
});
Prediction market hierarchy
Prediction markets are structured in a hierarchy to group related information.
- Event: The broad topic (e.g., "Who will Trump nominate as Fed Chair?")
- Market: A specific tradeable question (e.g., "Will Trump nominate Kevin Warsh as the next Fed Chair?")
- Outcome: The
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
