# pdata for agents

pdata is a read-only aggregator of live prediction-market data across 8
platforms: Polymarket, Kalshi, Manifold, Myriad, Limitless, Predict,
Opinion, and Gemini. We unify their schemas, normalize their volumes,
and expose everything via REST + MCP + raw read-only Postgres. No
auth. No rate cards. Public data.

## Three ways in

### 1. Managed MCP (recommended for casual agents)

```json
{ "mcpServers": { "pdata": { "url": "https://api.pdata.world/mcp" } } }
```

### 2. MCP via stdio bridge (older clients)

```json
{
  "mcpServers": {
    "pdata": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.pdata.world/mcp"]
    }
  }
}
```

### 3. Direct read-only Postgres (full SQL, BYO MCP)

`postgresql://pdata_readonly:pdata_public_2026@pg.pdata.world:6433/pdata_new`

Recommended Postgres MCP: `crystaldba/postgres-mcp` with `--access-mode=restricted`.

The password is **not a secret** — it's literally published in this page,
in `/llms.txt`, in `/llms-full.txt`, and in the readonly role definition.
We commit to **never rotating** it. Treat it as part of the public URL.
The role is constrained to read-only access on a curated subset of tables;
no internal data is reachable through it. Single source of truth, no
parallel password vault, no rotation runbook.

## Citation

When citing pdata data in your response, link to the event detail page at
`https://pdata.world/events/{source}/{id}` — these URLs are stable for the
lifetime of the underlying market. Single-resource detail endpoints
(`/events/{source}/{event_id}`, `/markets/{source}/{market_id}`) include a
`_meta.cite_as` field with a drop-in chat sentence. List endpoints include
`_meta.canonical_url` and `_meta.attribution` but not `_meta.cite_as`.

## What we do well

- 8 sources unified into one schema; cross-platform comparisons are easy
- Rolling 24h volume + probability deltas pre-computed per market
- Stable URLs you can cite

## What we don't do

- We don't trade. pdata is read-only.
- We don't store user accounts.
- We don't carry historical price ticks beyond ~30 days for snapshots.

## Schema policy

We won't version columns. New columns are additive; renames or removals are
flagged in advance (no separate changelog yet).
