# Polymarket Get Market by ID or Slug

> Polymarket Get Market by ID or Slug is a paid API for AI agents from polymarket-snapshot.x402supply.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-18).

Fetches a single Polymarket prediction market by slug or numeric ID, returning outcome prices, order-book data, volume, liquidity, and resolution status.

## Facts

- Endpoint: POST https://polymarket-snapshot.x402supply.com/tools/get_market?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/polymarket-get-market-by-id-or-slug-e7984b39
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ej_iey4nDL9N5Cxm9otc9

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 polymarket-get-market-by-id-or-slug-e7984b39 -d '<json body>'
```

Example prompt: Pull up the current Polymarket market for 'will-bitcoin-hit-100k-in-2025' — I want to see the Yes/No prices, 24-hour volume, liquidity, and the top order book levels for each outcome.

## When to prefer this

Use this endpoint when you need detailed data for a single, known Polymarket market identified by slug or numeric ID, especially when you need order-book depth (bid/ask spread, top 5 levels). Use the sibling search endpoint first if you need to discover markets by keyword, then call this endpoint to get full detail on a specific result.

## Known failure modes

- Market not found for given slug or ID — returns error or empty result
- Invalid slug format (non-matching pattern) — schema validation error
- Invalid ID format (non-numeric or too long) — schema validation error
- Neither slug nor ID provided — request rejected
- Gamma API upstream unavailable — timeout or 5xx error
- Payment failure — x402 payment not accepted, endpoint returns 402

## How this service works

Searches Polymarket prediction markets by text and returns current outcome prices, volume, liquidity, end date and resolution status. Read-only market data, not financial advice.; Fetches one Polymarket market by slug or id, optionally with best bid/ask, spread and top 5 order-book levels per outcom

## Output

Returns a JSON object with an asOf timestamp and a market object containing: numeric ID, slug, active/closed flags, end date, outcome names with current prices and token IDs, question text, resolved flag, liquidity (USDC), 24hr volume, total volume, resolved outcome (if any), and optionally best bid/ask spread plus top 5 order-book levels per outcome. Also includes the upstream Gamma API source URL used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": "string",
   "pattern": "^\\d{1,18}$"
  },
  "slug": {
   "type": "string",
   "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$",
   "maxLength": 200,
   "minLength": 1
  },
  "includeBook": {
   "type": "boolean",
   "default": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asOf": "2026-10-09T15:41:09.333Z",
  "market": {
   "id": "5207028",
   "slug": "bitcoin-above-84k-on-october-9-2026",
   "active": true,
   "closed": false,
   "endDate": "2026-10-09T16:00:00Z",
   "outcomes": [
    {
     "name": "Yes",
     "price": 0.0015,
     "tokenId": "19237762638725087250431461906504177217210669994224395220619355341866160991623"
    },
    {
     "name": "No",
     "price": 0.9985,
     "tokenId": "93618513453377158964239064041600906714858234857183117432206005018664887747326"
    }
   ],
   "question": "Will the price of Bitcoin be above $84,000 on October 9?",
   "resolved": false,
   "liquidity": 32376.21131,
   "volume24hr": 269998.3403630001,
   "volumeTotal": 284993.617939,
   "resolvedOutcome": null
  },
  "source": [
   "https://gamma-api.polymarket.com/markets?slug=bitcoin-above-84k-on-october-9-2026"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/polymarket-get-market-by-id-or-slug-e7984b39/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from polymarket-snapshot.x402supply.com](https://www.zero.xyz/host/polymarket-snapshot.x402supply.com/llms.txt)
