Skip to main content

pdata-client

Python client, AI-assistant plugin files and sample data for pdata.world, a free, read-only API for prediction-market data from eight venues: Polymarket, Kalshi, Manifold, Myriad, Limitless, Predict, Opinion and Gemini.

pip install pdata-client
from pdata import Client

pd = Client()
page = pd.markets(source=["kalshi", "polymarket"], closed=False, sort="-volume_24hr", page_size=5)
for m in page["items"]:
    print(m["source"], f"{m['probability']:.0%}", m["event_title"], "—", m["question"])

Cite as: Data aggregated by pdata.world (https://pdata.world) from 8 prediction-market venues; CC BY 4.0; source data © each venue. Dataset DOI 10.5281/zenodo.23211610.

pdata.world polls each venue every 10 to 60 minutes and keeps prices, 24-hour volume and results in one schema, so one request can compare venues that otherwise each need their own integration. There is no API key and no signup. The data is published under CC BY 4.0: use it, and credit pdata.world.

Install

pip install pdata-client
# or the latest commit:
pip install git+https://github.com/noskillcoding/pdata-client

The client uses only the standard library (urllib, json, gzip), has no dependencies and runs on Python 3.9 or later. You can also copy src/pdata/client.py and src/pdata/_version.py into a project. It identifies itself as pdata-client/<version> (+https://pdata.world/agents); pass user_agent= to name your own project instead.

The MCP server and the assistant plugins

pdata.world hosts an MCP server at https://api.pdata.world/mcp (Streamable HTTP, no key, no account). It is read-only: its 14 tools read the same public data as the API. The server is run by pdata.world and its code is closed-source; it is not in this repository. This repository holds the Python client, the plugin files that connect coding assistants to the hosted server, and notes on the datasets. The server is listed in the official MCP registry as world.pdata/mcp.

  • Claude Code: /plugin install pdata --marketplace noskillcoding/pdata-client inside a session (Claude Code 2.1.275 or later), or from the shell claude plugin marketplace add noskillcoding/pdata-client followed by claude plugin install pdata@pdata-world. The plugin adds the MCP server and a skill, skills/pdata-prediction-markets/SKILL.md, that tells the assistant when to use pdata and how to cite it.
  • Gemini CLI: gemini extensions install https://github.com/noskillcoding/pdata-client adds the same server and skill.
  • Any other MCP client: add the server by URL, for example claude mcp add --transport http pdata https://api.pdata.world/mcp, or the config in examples/mcp.json.

What is in this repository

Path What it is
src/pdata/ The Python client, published on PyPI as pdata-client
.claude-plugin/, .mcp.json, skills/ Claude Code plugin and its one-plugin marketplace
gemini-extension.json Gemini CLI extension (uses the same skills/)
apify/ Source of an Apify actor that returns events with current prices
data/ Samples of the nightly bulk files, CC BY 4.0
examples/ Runnable scripts and an MCP client config

What the client covers

Method API operation What it returns
markets(**filters), iter_markets(...) GET /markets Markets, filtered and sorted, one page or all pages
market(source, id) GET /markets/{source}/{id} One market
top_movers(...), closing_soon(...) GET /markets/top-movers, /closing-soon Largest 24h price changes; markets closing next
events(**filters), iter_events(...) GET /events Events (an event groups the markets of one question)
event(source, id) GET /events/{source}/{id} One event with its markets, or its final results once archived
event_history(source, id, range=...) GET /events/{source}/{id}/history Price and 24h-volume series, 24h / 7d / 30d / all
similar_events(source, id) GET /events/{source}/{id}/similar The same or similar question on other venues
search(q) GET /search/suggest Events and markets by title
summary() GET /summary Per-venue counts and 24h volume
news_movers(...) GET /news/movers The price moves behind pdata.world/news
bulk_index(), iter_bulk(kind) /bulk/ Nightly full files, streamed without saving

Every method returns the API's JSON unchanged, so the API reference describes every field. Unknown filters are rejected with a message listing every allowed one. Errors raise PdataError with the API's code and message.

Runnable examples are in examples/: quickstart.py makes five common calls, and resolved_archive.py streams the archive of settled events.

Other ways to get the same data

  • MCP server for AI assistants: https://api.pdata.world/mcp; see above.
  • Nightly bulk files at https://api.pdata.world/bulk/: every open market (markets-open), every open event (events-open) and the archive of settled events with their results (resolved), as gzipped JSON lines. Line 1 of each file is a manifest giving the licence and every field's meaning and unit.
  • Monthly snapshot on Hugging Face: the same three files as Parquet, each snapshot tagged with its date: lowskillcoding/pdata-prediction-markets.
  • Read-only Postgres with full SQL: postgresql://pdata_readonly:pdata_public_2026@pg.pdata.world:6433/pdata_new. The password is published on purpose and is never rotated. Queries are capped at 5 seconds. See examples/postgres.sql.
  • The website: every event has a page at https://pdata.world/events/{source}/{id}, and https://pdata.world/data describes all of the above.

Sample data

data/ holds random samples of the three bulk files as of 7 October 2026: 1,000 open markets, 500 open events and 1,000 settled events, with an equal share per venue where the venue had enough rows. Each file starts with the manifest line. They are for looking at the shape of the data; the full files are rebuilt every night.

Units and things to know

  • probability and prices are on a 0–1 scale.
  • volume and volume_24hr are in each venue's own unit and are not converted across venues: shares for Polymarket and contracts for Kalshi (each pays $1 at resolution), play-money mana for Manifold, and each other venue's figure as it reports it. How eight venues count volume explains each one.
  • Price history starts in May 2026. Points older than 7 days are kept as 12-hour buckets, and a market's history is deleted 10 days after it closes. After that, the event's URL returns "kind": "tombstone" with each top market's final result.
  • In the resolved archive, each market's probability is the last price pdata saw, which is usually after the market settled. It records the result; it is not a forecast.
  • Events that closed between 2 June and 11 August 2026 are missing from the resolved archive: they were pruned before a backup was taken.
  • pdata groups Kalshi's sibling events for one game under a single group event (is_group); its volume is the sum of its children.

Research using this data

pdata.world publishes dated reports built from this data, each with its method and limits:

Citing

The data is CC BY 4.0. A credit such as "Data: pdata.world" with a link is enough. Every single-event API answer also carries _meta.cite_as, a ready-made citation sentence. For papers, cite the dataset on Zenodo: DOI 10.5281/zenodo.23211610 always resolves to the latest snapshot, and each snapshot has its own DOI, such as 10.5281/zenodo.23211611 for 7 October 2026. The calibration note is 10.5281/zenodo.23212130. GitHub's "Cite this repository" button uses CITATION.cff.

Licence

The code in this repository, including the plugin files and the Apify actor, is under the MIT licence. The data, including the files in data/, is under CC BY 4.0; the underlying market data remains subject to each venue's own terms.

pdata.world is independent and not affiliated with any of the venues it tracks.

Releasing

One version covers the PyPI package, the Claude Code plugin and the Gemini extension. Bump it in src/pdata/_version.py, .claude-plugin/plugin.json and gemini-extension.json together (a test fails otherwise), then push a tag v<version>: publish.yml builds, tests and uploads to PyPI through trusted publishing. Contact: support@pdata.world.

Metadata

Release files for pdata-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdata-client 0.1.0
File Size Uploaded Provenance Actions
pdata_client-0.1.0.tar.gz 17.2 kB With provenance Details for pdata_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pdata-client 0.1.0
File Interpreter ABI Platform Actions
pdata_client-0.1.0-py3-none-any.whl Python 3 none any Details for pdata_client-0.1.0-py3-none-any.whl

Total release size: 29.0 kB

Release files / pdata_client-0.1.0.tar.gz

Download URL pdata_client-0.1.0.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3f576c8f7f4b87729b40c8e0279759e71b78ef72ef1eeb5ac187189da68ea836
BLAKE2b-256 checksum
How to use checksums
fa4465893efd09a6efdc2ade3d312b649794d7c2264e5202c50325a206245293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / pdata_client-0.1.0-py3-none-any.whl

Download URL pdata_client-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4be762e435d72e1d198196d66fbf37c51f26b573d8e5b3f14a2af1bada5f9b2
BLAKE2b-256 checksum
How to use checksums
527eb895ce65136ca53b14b7100f07bd47901a7536bec99ff2c03a71abf33c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for pdata-client 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pdata_client-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page