# PolyPulse: Polymarket Markets Closing Soon

> PolyPulse: Polymarket Markets Closing Soon is a paid API for AI agents from api.polypulse-x402.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Returns live Polymarket prediction markets that are closing within a specified number of days, filtered by volume, with current odds and price movement data.

## Facts

- Endpoint: GET https://api.polypulse-x402.workers.dev/v1/markets/closing-soon?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/polypulse-polymarket-markets-closing-soon-831bac64
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GeYU_3xR1FR8l5UxPX3Uh

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability polypulse-polymarket-markets-closing-soon-831bac64
```

Example prompt: Show me Polymarket prediction markets closing in the next 3 days that have at least $5,000 in 24-hour volume — give me the current odds, price changes, and links.

## When to prefer this

Use this endpoint when you specifically need prediction markets that are approaching resolution, enabling time-sensitive analysis, arbitrage detection, or last-minute odds monitoring. Prefer this over the volume or movers endpoints when expiry timing is the primary filter criterion. Best for agents that need to act on markets before they settle rather than simply track the most popular or fastest-moving ones.

## Known failure modes

- Payment failure if USDC balance insufficient or x402 header malformed — returns 402 Payment Required
- Polymarket Gamma API downtime causes stale or missing data — response may reflect cached data up to 60s old
- Invalid query parameter values (e.g. days > 30, limit > 50) return 400 Bad Request
- No markets match the filter criteria — returns empty markets array with count 0
- Network timeout on the Cloudflare Workers edge — returns 5xx error

## How this service works

Live Polymarket prediction-market data for AI agents: markets closing soon, biggest movers, top by volume ($0.01 each) and a one-call cross-market digest ($0.02). USDC via x402 on Base.

## Output

A JSON object containing a list of Polymarket markets closing within the specified window, each with the event name, market question, yes/no outcome probabilities, best bid/ask prices, spread, 24h and 1h price changes, 24h USD volume, liquidity in USD, closing date/time, and a direct Polymarket URL. Also includes total count, data source attribution, and a generated_at timestamp. Data is live from the Polymarket Gamma API, cached up to 60 seconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "days": {
       "type": "integer",
       "default": 7,
       "maximum": 30,
       "minimum": 1
      },
      "limit": {
       "type": "integer",
       "default": 15,
       "maximum": 50,
       "minimum": 1
      },
      "min_volume": {
       "type": "number",
       "default": 1000,
       "minimum": 0,
       "description": "minimum 24h volume (USD)"
      },
      "include_settled": {
       "type": "boolean",
       "default": false
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "source": "Polymarket Gamma API (live, cached <=60s)",
  "markets": [
   {
    "url": "https://polymarket.com/event/nfl-pit-cle-2026-10-02",
    "event": "Steelers vs. Browns",
    "spread": 0.01,
    "best_ask": 0.58,
    "best_bid": 0.57,
    "end_date": "2026-10-02T00:15:00Z",
    "outcomes": {
     "Browns": 0.425,
     "Steelers": 0.575
    },
    "question": "Steelers vs. Browns",
    "change_1h": 0,
    "yes_price": 0.575,
    "change_24h": 0.02,
    "liquidity_usd": 3447209,
    "volume_24h_usd": 516719
   }
  ],
  "generated_at": "2026-10-01T15:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/polypulse-polymarket-markets-closing-soon-831bac64/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.polypulse-x402.workers.dev](https://www.zero.xyz/host/api.polypulse-x402.workers.dev/llms.txt)
