{"id":44508706,"url":"https://github.com/pmxt-dev/pmxt","last_synced_at":"2026-06-11T09:00:40.632Z","repository":{"id":331899176,"uuid":"1130657894","full_name":"pmxt-dev/pmxt","owner":"pmxt-dev","description":"CCXT for prediction markets. PMXT is a unified API for trading on Polymarket, Kalshi, and more.","archived":false,"fork":false,"pushed_at":"2026-06-08T13:19:24.000Z","size":9380,"stargazers_count":1870,"open_issues_count":343,"forks_count":215,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-06-08T14:23:36.386Z","etag":null,"topics":["algotrading","arbitrage","ccxt","kalshi","market-data","polymarket","prediction-markets","unified-api"],"latest_commit_sha":null,"homepage":"https://pmxt.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmxt-dev.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.mdx","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"samueltinnerholm","thanks_dev":null,"custom":null}},"created_at":"2026-01-08T20:24:39.000Z","updated_at":"2026-06-08T13:18:01.000Z","dependencies_parsed_at":"2026-05-22T21:07:14.497Z","dependency_job_id":null,"html_url":"https://github.com/pmxt-dev/pmxt","commit_stats":null,"previous_names":["qoery-com/pmxt","pmxt-dev/pmxt"],"tags_count":319,"template":false,"template_full_name":null,"purl":"pkg:github/pmxt-dev/pmxt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmxt-dev%2Fpmxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmxt-dev%2Fpmxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmxt-dev%2Fpmxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmxt-dev%2Fpmxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmxt-dev","download_url":"https://codeload.github.com/pmxt-dev/pmxt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmxt-dev%2Fpmxt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34190585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algotrading","arbitrage","ccxt","kalshi","market-data","polymarket","prediction-markets","unified-api"],"created_at":"2026-02-13T12:55:47.535Z","updated_at":"2026-06-11T09:00:40.601Z","avatar_url":"https://github.com/pmxt-dev.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/samueltinnerholm"],"categories":["Prediction Markets","Broker APIs","Python","TypeScript"],"sub_categories":["Polymarket Tools","Crypto","Numerical Libraries \u0026 Data Structures"],"readme":"# pmxt [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=The%20ccxt%20for%20prediction%20markets.\u0026url=https://github.com/pmxt-dev/pmxt\u0026hashtags=predictionmarkets,trading)  [![DOI](https://zenodo.org/badge/1130657894.svg)](https://doi.org/10.5281/zenodo.19111315)\n\n\n**The [ccxt](https://github.com/ccxt/ccxt) for prediction markets.** Hosted unified API for prediction markets — trade Polymarket, Kalshi, Opinion, and more from one API key. Open-source SDK and self-host option included.\n\n\n\u003cimg width=\"3840\" height=\"2160\" alt=\"plot\" src=\"https://github.com/user-attachments/assets/ed77d244-c95f-4fe0-a7a7-89af713c053f\" /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd rowspan=\"3\"\u003e\n\u003ca href=\"https://www.producthunt.com/products/ccxt-for-prediction-markets?embed=true\u0026amp;utm_source=badge-featured\u0026amp;utm_medium=badge\u0026amp;utm_campaign=badge-ccxt-for-prediction-markets\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg 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\u0026amp;theme=light\u0026amp;t=1768206672608\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://img.shields.io/github/watchers/pmxt-dev/pmxt?style=social\" alt=\"GitHub watchers\"\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/pmxt-dev/pmxt\"\u003e\u003cimg src=\"https://pmxt-dev.github.io/pmxt-stats/badges/total-downloads.svg\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://img.shields.io/github/forks/pmxt-dev/pmxt?style=social\" alt=\"GitHub forks\"\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-green.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/pmxt-dev/pmxt/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/pmxt-dev/pmxt?refresh=1\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://www.npmjs.com/package/pmxtjs\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/pmxtjs?label=version\" alt=\"version\"\u003e\n\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://discord.gg/Pyn252Pg95\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/1461393765196501015?label=Discord\u0026logo=discord\u0026logoColor=white\u0026style=for-the-badge\u0026color=5865F2\" alt=\"Discord\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### Supported Exchanges\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://polymarket.com\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://polymarket.com/favicon.ico\" alt=\"Polymarket\" width=\"24\" height=\"24\"\u003e \u003cb\u003ePolymarket\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://polymarket.us\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://polymarket.us/favicon.ico\" alt=\"Polymarket US\" width=\"24\" height=\"24\"\u003e \u003cb\u003ePolymarket US\u003c/b\u003e 🇺🇸\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://kalshi.com\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://kalshi.com/favicon.ico\" alt=\"Kalshi\" width=\"24\" height=\"24\"\u003e \u003cb\u003eKalshi\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://limitless.exchange\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://limitless.exchange/assets/images/logo.svg\" alt=\"Limitless\" width=\"24\" height=\"24\"\u003e \u003cb\u003eLimitless\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://probable.markets\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://developer.probable.markets/logo.svg\" alt=\"Probable\" width=\"100\"\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003c!-- # The baozi website seems to just show 50:50 odds for everything. Something must be fundamentally broken on their end. --\u003e\n  \u003ca href=\"https://myriad.markets\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://myriad.markets/favicon.ico\" alt=\"Myriad\" width=\"24\" height=\"24\"\u003e \u003cb\u003eMyriad\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://opinion.trade\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://app.opinion.trade/assets/apple-splash-2048-2732.jpg\" alt=\"Opinion\" width=\"24\" height=\"24\"\u003e \u003cb\u003eOpinion\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://www.metaculus.com\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://www.metaculus.com/favicon.ico\" alt=\"Metaculus\" width=\"24\" height=\"24\"\u003e \u003cb\u003eMetaculus\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://smarkets.com\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://smarkets.com/favicon.ico\" alt=\"Smarkets\" width=\"24\" height=\"24\"\u003e \u003cb\u003eSmarkets\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://hyperliquid.xyz\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://pmxt.dev/venues/hyperliquid.png\" alt=\"Hyperliquid\" width=\"24\" height=\"24\"\u003e \u003cb\u003eHyperliquid\u003c/b\u003e\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://gemini.com\" style=\"color: inherit; text-decoration: none;\"\u003e\u003cimg src=\"https://pmxt.dev/venues/gemini-titan.png\" alt=\"Gemini Titan\" width=\"24\" height=\"24\"\u003e \u003cb\u003eGemini Titan\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[Feature Support \u0026 Compliance](core/COMPLIANCE.md).\n\n## Why pmxt?\n\nDifferent prediction market platforms have different APIs, data formats, and conventions. pmxt provides a single, consistent interface to work with all of them.\n\n- **Hosted API.** Get a key at [pmxt.dev/dashboard](https://pmxt.dev/dashboard), construct a client, trade. PMXT handles custody, signing infrastructure, and on-chain settlement.\n- **Open source (MIT).** Self-host the local server for full control — your keys, your machine, no PMXT in the loop. See [Self-hosted](#self-hosted).\n- **Language-agnostic.** Python and TypeScript SDKs today, with HTTP access for any other language. No lock-in to a single ecosystem.\n- **Drop-in Dome API replacement.** Automatic codemod (`dome-to-pmxt`) for teams migrating after the Polymarket acquisition.\n- **Unified trading, not just data.** Place orders across Polymarket, Kalshi, and Limitless with a single interface.\n- **[MCP-native](https://pmxt.dev/mcp).** Use pmxt directly from Claude, Cursor, and other AI agents.\n  \n\n## Installation\n\nEnsure that [`Node.js`](https://nodejs.org) (\u003e= 18) is installed and the `node` command is available on your PATH. The Python SDK requires Python \u003e= 3.8.\n\n### Python\n```bash\npip install pmxt\n```\n\n### Node.js\n```bash\nnpm install pmxtjs\n```\n\n### CLI\n```bash\nnpm install -g @pmxt/cli\npmxt polymarket markets --query Trump --limit 5\npmxt polymarket fetchMarkets --query Trump --limit 5\npmxt auth status\n```\n\n### Running from Source\n```bash\ngit clone https://github.com/pmxt-dev/pmxt.git\ncd pmxt\nnpm install\nnpm run dev\n```\n\n### MCP (for AI agents)\n```bash\nnpx -y @pmxt/mcp\n```\nSee [@pmxt/mcp](https://github.com/pmxt-dev/pmxt-mcp) for setup with Claude, Cursor, and other MCP-compatible clients.\n\n## Migrating from Dome API\n\nIf you're currently using **Dome API**, pmxt is a drop-in replacement with a unified interface for Polymarket and Kalshi.\n\nCheck out [pmxt as a Dome API alternative](https://pmxt.dev/dome-api-alternative) for a detailed migration guide, API comparison, and automatic codemod tool (`dome-to-pmxt`) to help you transition your code.\n\n```bash\n# Automatically migrate your codebase\nnpx dome-to-pmxt ./src\n```\n\n## Quickstart\n\nGet your API key at [pmxt.dev/dashboard](https://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.\n\n### Python\n```python\nimport pmxt\n\n# Reads — pmxt_api_key + wallet_address only\nclient = pmxt.Polymarket(\n    pmxt_api_key=\"pmxt_live_...\",\n    wallet_address=\"0xYourWalletAddress\",\n)\n\npositions = client.fetch_positions()\nbalance = client.fetch_balance()\nmarkets = client.fetch_markets(query=\"nba\")\n\n# Trading — also pass private_key\ntrader = pmxt.Polymarket(\n    pmxt_api_key=\"pmxt_live_...\",\n    wallet_address=\"0xYourWalletAddress\",\n    private_key=\"0xYourPrivateKey\",\n)\norder = trader.create_order(\n    market_id=\"market-uuid\",\n    outcome_id=\"outcome-uuid\",\n    side=\"buy\",\n    order_type=\"market\",\n    amount=5.0,\n    denom=\"usdc\",\n    slippage_pct=30.0,\n)\n```\n\n### TypeScript\n\n\u003e **Note:** Named imports do not work in ESM. Use `import pmxt from 'pmxtjs'` (default import) for the namespaced form, or import `Polymarket` from `pmxtjs` only via the CJS build.\n\n```typescript\nimport { Polymarket } from \"pmxtjs\";\n\n// Reads — pmxtApiKey + walletAddress only\nconst client = new Polymarket({\n  pmxtApiKey: \"pmxt_live_...\",\n  walletAddress: \"0xYourWalletAddress\",\n});\n\nconst positions = await client.fetchPositions();\nconst balance = await client.fetchBalance();\n\n// Trading — also pass privateKey\nconst trader = new Polymarket({\n  pmxtApiKey: \"pmxt_live_...\",\n  walletAddress: \"0xYourWalletAddress\",\n  privateKey: \"0xYourPrivateKey\",\n});\nconst order = await trader.createOrder({\n  marketId: \"market-uuid\",\n  outcomeId: \"outcome-uuid\",\n  side: \"buy\",\n  type: \"market\",\n  amount: 5.0,\n  denom: \"usdc\",\n  slippage_pct: 30.0,\n} as any);\n```\n\n### Prediction market hierarchy\n\nPrediction markets are structured in a hierarchy to group related information.\n\n*   **Event**: The broad topic (e.g., *\"Who will Trump nominate as Fed Chair?\"*)\n*   **Market**: A specific tradeable question (e.g., *\"Will Trump nominate Kevin Warsh as the next Fed Chair?\"*)\n*   **Outcome**: The actual share you buy (e.g., *\"Yes\"* or *\"No\"*)\n\n## Trading\npmxt supports unified trading across exchanges. The hosted API is the default — see Quickstart above for the basic flow.\n\n### Hosted trading (recommended)\n\nWith a PMXT API key, you only need your wallet address and a private key to sign orders. PMXT handles custody, signer infrastructure, and on-chain settlement.\n\n```python\nimport pmxt\n\ntrader = pmxt.Polymarket(\n    pmxt_api_key=\"pmxt_live_...\",\n    wallet_address=\"0xYourWalletAddress\",\n    private_key=\"0xYourPrivateKey\",\n)\n\n# 1. Check balance\nbalance = trader.fetch_balance()\nprint(f\"Available balance: {balance[0].available}\")\n\n# 2. Fetch markets\nmarkets = trader.fetch_markets(query='Trump')\n\n# 3. Place an order\norder = trader.create_order(\n    market_id=markets[0].market_id,\n    outcome_id=markets[0].yes.outcome_id,\n    side='buy',\n    order_type='market',\n    amount=5.0,\n    denom='usdc',\n    slippage_pct=30.0,\n)\nprint(f\"Order status: {order.status}\")\n```\n\n### Self-hosted trading (advanced)\n\nUse this when you self-host the local server. See [Self-hosted](#self-hosted) for setup. You provide venue credentials directly — no `pmxt_api_key` required. For detailed credential setup instructions, see the exchange-specific guides: [Polymarket](core/docs/SETUP_POLYMARKET.md), [Kalshi](core/docs/SETUP_KALSHI.md), [Limitless](core/docs/SETUP_LIMITLESS.md).\n\n#### Polymarket\n```python\nexchange = pmxt.Polymarket(\n    private_key=os.getenv('POLYMARKET_PRIVATE_KEY'),\n    proxy_address=os.getenv('POLYMARKET_PROXY_ADDRESS'), # Optional: For proxy trading\n    signature_type='gnosis-safe' # Default\n)\n```\n\n#### Kalshi\n```python\n exchange = pmxt.Kalshi(\n    api_key=os.getenv('KALSHI_API_KEY'),\n    private_key=os.getenv('KALSHI_PRIVATE_KEY') # RSA Private Key\n)\n```\n\n#### Limitless\n```python\nexchange = pmxt.Limitless(\n    api_key=os.getenv('LIMITLESS_API_KEY'),\n    private_key=os.getenv('LIMITLESS_PRIVATE_KEY') # For order signing (EIP-712)\n)\n```\n\n## Self-hosted\n\nTo self-host pmxt-core on your own machine: `pip install pmxt-core` (Python) or `npm install pmxt-core` (Node.js), then construct any venue client without `pmxt_api_key`. The SDK spawns a local PMXT service; you supply venue credentials directly. See the [self-hosted guide](https://pmxt.dev/docs/guides/self-hosted) for details.\n\n## Documentation\n\nSee the [API Reference](https://www.pmxt.dev/docs) for detailed documentation and more examples.\n\n## Examples\n\nCheck out the directory for more use cases:\n\n[TypeScript](https://github.com/pmxt-dev/pmxt/tree/main/sdks/typescript/examples) [Python](https://github.com/pmxt-dev/pmxt/tree/main/sdks/python/examples)\n\n## Sponsors\n\u003cdiv align=\"center\"\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"300\" valign=\"middle\"\u003e\n      \u003ca href=\"https://nearbase.dev/?utm_source=pmxt\u0026utm_medium=sponsorship\"\u003e\n        \u003cimg src=\"https://nearbase.dev/nearbase.svg\" alt=\"Nearbase\" height=\"40\"/\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"300\" valign=\"middle\"\u003e\n      \u003ca href=\"https://ondb.ai/\"\u003e\n        \u003cimg src=\"https://ondb.ai/images/logo-full-white-text.svg\" alt=\"OnDB.ai\" height=\"40\" valign=\"middle\"/\u003e\n        \u003cb\u003eOnDB.ai\u003c/b\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n[![Stargazers repo roster for @pmxt-dev/pmxt](https://reporoster.com/stars/pmxt-dev/pmxt)](https://github.com/pmxt-dev/pmxt/stargazers)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmxt-dev%2Fpmxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmxt-dev%2Fpmxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmxt-dev%2Fpmxt/lists"}