# PredictIt (prediction market prices)

Gateway provider `predictit` · call `https://fetchapi.co/api/gw/predictit/<path>` with header `x-api-key` (get a key at https://fetchapi.co/keys) · MCP: tools `search_endpoints`, `get_endpoint`, `call_endpoint` at https://fetchapi.co/api/mcp · listing: https://www.predictit.org/api/marketdata/all/

2 working endpoints, each tested live through this gateway. Endpoints that returned no data in our latest test, write actions and endpoints that need the end user's own login are not listed.

## `predictit.marketdata_all` — List every open PredictIt market with its contracts' prices (PredictIt)

`GET /marketdata/all` · ✓ working (tested 2026-11-02) · sampled 2026-10-22, 132 ms

One call returns every open PredictIt market (about 220 on 2026-10-22: House, Senate and governor races, control of Congress, the presidency, world events). One item in the answer is a market with its contracts; each contract carries the last trade price and the best price to buy or sell Yes and No, in dollars per $1 share, so 0.92 means a 92% implied chance. There is no paging: the whole list comes in one answer. Prices move about once a minute and the gateway caches the answer for 60 seconds.

Fields: `markets[].id` Market id, for marketdata/markets/{id}; `markets[].name` The question the market asks; `markets[].url` Market page on predictit.org; `markets[].timeStamp` When prices were read, US Eastern time; `markets[].contracts[].name` The outcome (a party, candidate or range); `markets[].contracts[].lastTradePrice` Last traded price per $1 share (0 if never traded); `markets[].contracts[].bestBuyYesCost` Cheapest Yes offer (ask); `markets[].contracts[].bestSellYesCost` Best Yes bid; `markets[].contracts[].bestBuyNoCost` Cheapest No offer; `markets[].contracts[].lastClosePrice` Previous day's closing price

```bash
curl "https://fetchapi.co/api/gw/predictit/marketdata/all" \
  -H "x-api-key: $FETCHAPI_KEY"
```

Real answer (trimmed):

```json
{
 "markets": [
  {
   "id": 7589,
   "url": "https://www.predictit.org/markets/detail/7589/How-many-House-seats-will-Republicans-win-in-the-2026-midterm-election",
   "name": "How many House seats will Republicans win in the 2026 midterm election?",
   "image": "https://cdn1.predictit.org/images/Markets/b2def0a6-92a1-4247-bc77-ec76ebea642f.jpg",
   "status": "Open",
   "contracts": [
    {
     "id": 28361,
     "name": "192 or fewer",
     "image": "https://cdn1.predictit.org/images/Contracts/small_dd478de0-c068-44c0-8aaf-0d93ee3edd0e.png",
     "status": "Open",
     "dateEnd": "NA",
     "shortName": "192 or fewer",
     "displayOrder": 0,
     "bestBuyNoCost": 0.63,
     "bestBuyYesCost": 0.43,
     "bestSellNoCost": 0.57,
     "lastClosePrice": 0.43,
     "lastTradePrice": 0.43,
     "bestSellYesCost": 0.37
    },
    {
     "id": 28362,
     "name": "193 to 197",
     "image": "https://cdn1.predictit.org/images/Contracts/small_dd478de0-c068-44c0-8aaf-0d93ee3edd0e.png",
     "status": "Open",
     "dateEnd": "NA",
     "shortName": "193 to 197",
     "displayOrder": 0,
     "bestBuyNoCost": 0.83,
     "bestBuyYesCost": 0.18,
     "bestSellNoCost": 0.82,
     "lastClosePrice": 0.18,
     "lastTradePrice": 0.17,
     "bestSellYesCost": 0.17
    },
    {
     "id": 28369,
     "name": "198 to 202",
     "image": "https://cdn1.predictit.org/images/Contracts/small_dd478de0-c068-44c0-8aaf-0d93ee3edd0e.png",
     "status": "Open",
     "dateEnd": "NA",
     "shortName": "198 t
…
```

## `predictit.marketdata_market` — Get one PredictIt market's contracts and prices (PredictIt)

`GET /marketdata/markets/{id}` · ✓ working (tested 2026-11-02) · sampled 2026-10-22, 82 ms

One call returns one PredictIt market by its id, with every contract's last trade price and best Yes and No buy and sell prices in dollars per $1 share (0.92 = 92% implied). The sample held the 2026 House control market with 2 contracts (Democratic, Republican). Prices move about once a minute; the gateway caches each answer for 60 seconds.

| param | required | example / default |
|---|---|---|
| `id` | yes | 8157 |

Fields: `name` The question the market asks; `timeStamp` When prices were read, US Eastern time; `contracts[].name` The outcome; `contracts[].lastTradePrice` Last traded price per $1 share; `contracts[].bestBuyYesCost` Cheapest Yes offer (ask); `contracts[].bestSellYesCost` Best Yes bid; `contracts[].bestBuyNoCost` Cheapest No offer; `contracts[].bestSellNoCost` Best No bid

```bash
curl "https://fetchapi.co/api/gw/predictit/marketdata/markets/8157" \
  -H "x-api-key: $FETCHAPI_KEY"
```

Real answer (trimmed):

```json
{
 "id": 8157,
 "url": "https://www.predictit.org/markets/detail/8157/Which-party-will-win-the-House-in-the-2026-election",
 "name": "Which party will win the House in the 2026 election?",
 "image": "https://cdn1.predictit.org/images/Markets/71c780c4-fde9-41e3-8376-0399f0354378.png",
 "status": "Open",
 "contracts": [
  {
   "id": 31951,
   "name": "Democratic",
   "image": "https://cdn1.predictit.org/images/Contracts/small_dd7a25d1-8892-432c-9991-7047953ca799.png",
   "status": "Open",
   "dateEnd": "NA",
   "shortName": "Democratic",
   "displayOrder": 0,
   "bestBuyNoCost": 0.09,
   "bestBuyYesCost": 0.92,
   "bestSellNoCost": 0.08,
   "lastClosePrice": 0.93,
   "lastTradePrice": 0.92,
   "bestSellYesCost": 0.91
  },
  {
   "id": 31952,
   "name": "Republican",
   "image": "https://cdn1.predictit.org/images/Contracts/small_50585c92-15cf-424d-b497-1127cb3a6f5a.png",
   "status": "Open",
   "dateEnd": "NA",
   "shortName": "Republican",
   "displayOrder": 0,
   "bestBuyNoCost": 0.9,
   "bestBuyYesCost": 0.11,
   "bestSellNoCost": 0.89,
   "lastClosePrice": 0.08,
   "lastTradePrice": 0.1,
   "bestSellYesCost": 0.1
  }
 ],
 "shortName": "Which party will win the House in 2026?",
 "timeStamp": "2026-10-22T15:05:48.2461207"
}
```
