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

# Markets by Category

> Browse markets by category with pagination and event counts.

Returns markets for a specific category, sorted by 24h volume. Supports pagination with `limit` and `offset`.

<ParamField path="category" type="string" required>
  Category slug. One of:

  | Category    | Slug          |
  | ----------- | ------------- |
  | Crypto      | `crypto`      |
  | Politics    | `politics`    |
  | Sports      | `sports`      |
  | Finance     | `finance`     |
  | Economy     | `economy`     |
  | Tech        | `tech`        |
  | Pop Culture | `pop-culture` |
  | Geopolitics | `geopolitics` |
  | Weather     | `weather`     |
  | Iran        | `iran`        |
  | Elections   | `elections`   |
  | Mentions    | `mentions`    |
  | Esports     | `esports`     |
</ParamField>

<ParamField query="limit" type="number" default="20">
  Number of events to return. Min 1, max 100.
</ParamField>

<ParamField query="offset" type="number" default="0">
  Pagination offset. Use with `limit` to page through results.
</ParamField>

### Example

```bash theme={null}
curl "https://api.polynode.dev/v2/markets/crypto?limit=50&offset=0&key=YOUR_API_KEY"
```

<ResponseExample>
  ```json theme={null}
  {
    "category": "crypto",
    "counts": {
      "all": 260,
      "fiveM": 7,
      "fifteenM": 7,
      "pre-market": 112,
      "etf": 2,
      "hourly": 9,
      "fourhour": 7,
      "daily": 11,
      "weekly": 64,
      "monthly": 23,
      "yearly": 22,
      "bitcoin": 35,
      "ethereum": 21,
      "solana": 12,
      "xrp": 11,
      "dogecoin": 6,
      "bnb": 6,
      "microstrategy": 8
    },
    "events": [
      {
        "id": "273112",
        "slug": "bitcoin-above-on-april-23",
        "title": "Bitcoin above ___ on April 23?",
        "image": "https://...",
        "volume": 12345678,
        "volume24hr": 5678901,
        "liquidity": 1234567,
        "openInterest": 890123,
        "startDate": "2025-04-22T00:00:00Z",
        "endDate": "2025-04-23T23:59:59Z",
        "active": true,
        "closed": false,
        "new": false,
        "featured": true,
        "competitive": true,
        "commentCount": 42,
        "tags": ["Crypto", "Bitcoin"]
      }
    ],
    "limit": 50,
    "offset": 0
  }
  ```
</ResponseExample>

### Response Fields

Each event object includes:

| Field          | Type      | Description                      |
| -------------- | --------- | -------------------------------- |
| `id`           | string    | Event ID                         |
| `slug`         | string    | URL slug                         |
| `title`        | string    | Event title                      |
| `image`        | string    | Event image URL                  |
| `volume`       | number    | Total lifetime volume            |
| `volume24hr`   | number    | 24-hour trading volume           |
| `liquidity`    | number    | Current liquidity                |
| `openInterest` | number    | Open interest                    |
| `startDate`    | string    | Event start date (ISO 8601)      |
| `endDate`      | string    | Event end date (ISO 8601)        |
| `active`       | boolean   | Whether the event is active      |
| `closed`       | boolean   | Whether the event is closed      |
| `new`          | boolean   | Whether the event is new         |
| `featured`     | boolean   | Whether the event is featured    |
| `competitive`  | boolean   | Whether the event is competitive |
| `commentCount` | number    | Number of comments               |
| `tags`         | string\[] | Category tags                    |

### Pagination

Page through all markets in a category:

```python theme={null}
import requests

API_KEY = "pn_live_..."
category = "politics"
all_events = []
offset = 0

while True:
    resp = requests.get(
        f"https://api.polynode.dev/v2/markets/{category}",
        params={"key": API_KEY, "limit": 100, "offset": offset},
    ).json()
    events = resp.get("events", [])
    if not events:
        break
    all_events.extend(events)
    offset += len(events)

print(f"Total {category} events: {len(all_events)}")
```

<Note>
  The `counts` object varies by category. Crypto includes subcounts by asset and timeframe. Other categories return a simple `{"total": N}` count. Counts are cached and may not exactly match the paginated event total.
</Note>


## OpenAPI

````yaml GET /v2/markets/{category}
openapi: 3.1.0
info:
  title: PolyNode API
  description: >-
    Real-time Polymarket data API with decoded mempool settlements, OHLCV
    candles, and full Polygon JSON-RPC proxy.
  contact:
    name: PolyNode
    url: https://polynode.dev
  license:
    name: ''
  version: 2.0.0
servers:
  - url: https://api.polynode.dev
    description: Production
security:
  - api_key: []
paths:
  /v2/markets/{category}:
    get:
      tags:
        - Enriched Data
      summary: Markets by category
      description: >-
        Browse markets by category with event counts and category-specific
        metadata.
      operationId: markets_by_category
      parameters:
        - name: category
          in: path
          description: >-
            Category slug: crypto, politics, sports, finance, economy, tech,
            pop-culture, geopolitics, weather, iran, elections, mentions
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Category markets
          content:
            application/json:
              schema:
                type: object
              example:
                category: crypto
                counts:
                  all: '243'
                  fiveM: '7'
                  fifteenM: '7'
                  pre-market: '105'
                  etf: '2'
                  hourly: '8'
                  daily: '11'
                  weekly: '62'
                  bitcoin: '33'
                  ethereum: '21'
                  solana: '12'
                events:
                  - id: '310513'
                    slug: btc-updown-5m-1774625400
                    title: BTC 5 Minute Up or Down
                    image: >-
                      https://polymarket-upload.s3.us-east-2.amazonaws.com/BTC+fullsize.png
                    volume: 471.33
                    volume24hr: 471.33
                totalResults: 243
        '401':
          description: Missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Category not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api_key: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key

````