> ## Documentation Index
> Fetch the complete documentation index at: https://docs-polymarket-us.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Market API Overview

> Query market data and information

# Market API

The Market API provides access to market information, pricing, and settlement data.

## Endpoints

### Markets

| Method | Endpoint                        | Description                    |
| ------ | ------------------------------- | ------------------------------ |
| `GET`  | `/v1/markets`                   | Get all markets with filtering |
| `GET`  | `/v1/market/slug/{slug}`        | Get market by slug             |
| `GET`  | `/v1/market/id/{id}`            | Get market by ID               |
| `GET`  | `/v1/markets/{slug}/settlement` | Get market settlement price    |

## Key Market Fields

| Field         | Description                        |
| ------------- | ---------------------------------- |
| `id`          | Unique market identifier           |
| `slug`        | URL-friendly identifier            |
| `question`    | Market question                    |
| `description` | Detailed market description        |
| `category`    | Market category                    |
| `subcategory` | Market subcategory                 |
| `active`      | Whether market is accepting orders |
| `closed`      | Whether market has closed          |
| `archived`    | Whether market is archived         |

### Pricing Fields

| Field                | Description             |
| -------------------- | ----------------------- |
| `lastTradePrice`     | Most recent trade price |
| `bestBid`            | Best bid price          |
| `bestAsk`            | Best ask price          |
| `spread`             | Current bid-ask spread  |
| `oneDayPriceChange`  | 24-hour price change    |
| `oneWeekPriceChange` | 7-day price change      |

### Volume & Liquidity

| Field          | Description              |
| -------------- | ------------------------ |
| `liquidity`    | Current market liquidity |
| `liquidityNum` | Liquidity as number      |
| `volume`       | Total trading volume     |
| `volumeNum`    | Volume as number         |
| `volume24hr`   | 24-hour volume           |
| `volume1wk`    | 7-day volume             |
| `volume1mo`    | 30-day volume            |

### Sports Market Fields

| Field                | Type          | Description                             |
| -------------------- | ------------- | --------------------------------------- |
| `sportsMarketTypeV2` | string (enum) | Type: MONEYLINE, SPREAD, TOTAL, or PROP |
| `gameId`             | string        | Sports provider game ID                 |
| `line`               | number        | Line value for spread/total markets     |
| `propType`           | string        | Prop type for prop markets              |
| `outcomeTeamA`       | integer       | Team A outcome ID                       |
| `outcomeTeamB`       | integer       | Team B outcome ID                       |

## Filtering Markets

Query markets with various filters:

```bash theme={null}
GET /v1/markets?active=true&categories=sports&limit=50
```

### Status Filters

| Parameter  | Type    | Description               |
| ---------- | ------- | ------------------------- |
| `active`   | boolean | Filter by active status   |
| `closed`   | boolean | Filter by closed status   |
| `archived` | boolean | Filter by archived status |

### Category & Type Filters

| Parameter           | Type    | Description                                             |
| ------------------- | ------- | ------------------------------------------------------- |
| `categories`        | array   | Filter by categories                                    |
| `marketTypes`       | array   | Filter by market types                                  |
| `sportsMarketTypes` | array   | Filter by sports types (MONEYLINE, SPREAD, TOTAL, PROP) |
| `tagId`             | integer | Filter by tag ID                                        |
| `relatedTags`       | boolean | Include related tags                                    |
| `cyom`              | boolean | Filter CYOM markets                                     |

### ID Filters

| Parameter     | Type   | Description            |
| ------------- | ------ | ---------------------- |
| `id`          | array  | Filter by market IDs   |
| `slug`        | array  | Filter by market slugs |
| `questionIds` | array  | Filter by question IDs |
| `gameId`      | string | Filter by game ID      |

### Volume & Liquidity Filters

| Parameter         | Type   | Description          |
| ----------------- | ------ | -------------------- |
| `volumeNumMin`    | number | Minimum volume       |
| `volumeNumMax`    | number | Maximum volume       |
| `liquidityNumMin` | number | Minimum liquidity    |
| `liquidityNumMax` | number | Maximum liquidity    |
| `rewardsMinSize`  | number | Minimum rewards size |

### Date Filters

| Parameter      | Type   | Description        |
| -------------- | ------ | ------------------ |
| `startDateMin` | string | Minimum start date |
| `startDateMax` | string | Maximum start date |
| `endDateMin`   | string | Minimum end date   |
| `endDateMax`   | string | Maximum end date   |

## Pagination & Ordering

Use `limit` and `offset` for pagination:

```bash theme={null}
GET /v1/markets?limit=50&offset=100
```

| Parameter        | Type    | Description                |
| ---------------- | ------- | -------------------------- |
| `limit`          | integer | Page size                  |
| `offset`         | integer | Page offset                |
| `orderBy`        | array   | Fields to order by         |
| `orderDirection` | string  | Order direction (asc/desc) |

<Tip>
  **Real-Time Market Data**

  For real-time price updates and order book data, use the [WebSocket Markets Stream](/api-reference/websocket/markets) instead of polling the REST API.
</Tip>

## Settlement

After a market resolves, query the settlement price:

```bash theme={null}
GET /v1/markets/will-x-happen/settlement
```

Response:

```json theme={null}
{
  "slug": "will-x-happen",
  "settlement": 1.00
}
```

Settlement values are typically `0.00` (No) or `1.00` (Yes).
