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

# List markets grouped by event

> Homepage-style listing. Each page item is either a single market (`kind: single`) or an event with its child markets (`kind: group`). Pagination counts events, not individual markets. Same filters as `GET /markets` except `sortBy`. Extra `groupType` selects the kind of group (for example `SPORTS` vs `CRYPTO`).



## OpenAPI

````yaml /api-spec/openapi.yaml get /markets/grouped
openapi: 3.0.3
info:
  title: United Market API
  version: 1.0.0
  description: >-
    Public backend API for market data, trading, authentication, profiles,
    comments, and leaderboards.
servers:
  - url: https://api.unitedmarket.ai
    description: United Market backend
security: []
tags:
  - name: Markets
    description: >-
      Market discovery, market details, orderbooks, tickers, price history, and
      trades.
  - name: Orders
    description: Signed order submission, cancellation, order lookup, and balances.
  - name: Authentication
    description: SIWE wallet authentication.
  - name: Discovery
    description: Tags and market groups.
  - name: Social
    description: Comments, users, and leaderboard data.
  - name: Fees
    description: Effective trading fee rate per market.
  - name: Referral
    description: Referral codes, attribution, and reward summaries.
  - name: Sports
    description: Live and recently finished sports scores.
paths:
  /markets/grouped:
    get:
      tags:
        - Markets
      summary: List markets grouped by event
      description: >-
        Homepage-style listing. Each page item is either a single market (`kind:
        single`) or an event with its child markets (`kind: group`). Pagination
        counts events, not individual markets. Same filters as `GET /markets`
        except `sortBy`. Extra `groupType` selects the kind of group (for
        example `SPORTS` vs `CRYPTO`).
      operationId: listMarketsGrouped
      parameters:
        - $ref: '#/components/parameters/Search'
        - $ref: '#/components/parameters/Category'
        - $ref: '#/components/parameters/TagSlug'
        - $ref: '#/components/parameters/SubTagSlug'
        - $ref: '#/components/parameters/GroupId'
        - $ref: '#/components/parameters/GroupSlug'
        - $ref: '#/components/parameters/GroupSlugPrefix'
        - $ref: '#/components/parameters/Ungrouped'
        - $ref: '#/components/parameters/BetTypeName'
        - $ref: '#/components/parameters/MarketStatusFilter'
        - $ref: '#/components/parameters/ClobMarketStatusFilter'
        - $ref: '#/components/parameters/ExcludeBetTypeFilters'
        - $ref: '#/components/parameters/IncludeIncomplete'
        - $ref: '#/components/parameters/IncludeArchivedTags'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
        - name: groupType
          in: query
          schema:
            type: string
          description: Restrict to groups of this type (for example `SPORTS` or `CRYPTO`).
      responses:
        '200':
          description: Grouped markets returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGroupedMarkets'
components:
  parameters:
    Search:
      name: search
      in: query
      schema:
        type: string
      description: >-
        Search market question, description, ids, polymarket slug, or group
        title. This is not `q`.
    Category:
      name: category
      in: query
      schema:
        type: string
      description: Filter by category.
    TagSlug:
      name: tagSlug
      in: query
      schema:
        type: string
      description: Filter markets by tag slug.
    SubTagSlug:
      name: subTagSlug
      in: query
      schema:
        type: string
      description: Filter by sub-tag slug.
    GroupId:
      name: groupId
      in: query
      schema:
        type: string
      description: Filter by market group id.
    GroupSlug:
      name: groupSlug
      in: query
      schema:
        type: string
      description: Filter by exact market group slug.
    GroupSlugPrefix:
      name: groupSlugPrefix
      in: query
      schema:
        type: string
      description: Filter by group slug prefix (for example `fifa-2026-top32-`).
    Ungrouped:
      name: ungrouped
      in: query
      schema:
        type: string
        enum:
          - 'true'
          - '1'
      description: When `true` or `1`, only markets with no `groupId`.
    BetTypeName:
      name: betTypeName
      in: query
      schema:
        type: string
      description: Filter by sports bet type name (for example moneyline).
    MarketStatusFilter:
      name: status
      in: query
      schema:
        type: string
        enum:
          - OPEN
          - CLOSED
          - RESOLVED
          - CANCELLED
      description: Market lifecycle status.
    ClobMarketStatusFilter:
      name: clobMarketStatus
      in: query
      schema:
        type: string
        enum:
          - PENDING
          - REGISTERED
          - FAILED
      description: On-chain CLOB registration status.
    ExcludeBetTypeFilters:
      name: excludeBetTypeFilters
      in: query
      schema:
        type: string
        enum:
          - 'true'
          - '1'
      description: Exclude bet types hidden from sports event lists.
    IncludeIncomplete:
      name: includeIncomplete
      in: query
      schema:
        type: string
        enum:
          - 'true'
          - '1'
      description: Include markets missing outcome token ids (admin tooling).
    IncludeArchivedTags:
      name: includeArchivedTags
      in: query
      schema:
        type: string
        enum:
          - 'true'
          - '1'
      description: >-
        Include markets whose tag is ARCHIVED (admin tooling; hidden from public
        listings by default).
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Page number. Used with `pageSize`. Alternative to `offset`.
    PageSize:
      name: pageSize
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 60
      description: >-
        Items per page. Alias of `limit` when `page` / `pageSize` are omitted.
        Production clamps to 250.
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 60
      description: >-
        Page size. Markets and similar list endpoints clamp instead of 400:
        default 60, maximum 250, non-numeric values fall back to 60, and values
        below 1 become 1. Order list endpoints validate strictly and do return
        400. The response pagination object uses `page` / `pageSize`.
    Offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Number of items to skip.
  schemas:
    PaginatedGroupedMarkets:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/GroupedMarketEntry'
        pagination:
          $ref: '#/components/schemas/Pagination'
    GroupedMarketEntry:
      oneOf:
        - type: object
          required:
            - kind
            - market
          properties:
            kind:
              type: string
              enum:
                - single
            market:
              $ref: '#/components/schemas/Market'
        - type: object
          required:
            - kind
            - groupId
            - group
            - markets
          properties:
            kind:
              type: string
              enum:
                - group
            groupId:
              type: string
            group:
              $ref: '#/components/schemas/MarketGroup'
            markets:
              type: array
              items:
                $ref: '#/components/schemas/Market'
    Pagination:
      type: object
      properties:
        page:
          type: integer
          example: 1
        pageSize:
          type: integer
          example: 60
        total:
          type: integer
        totalPages:
          type: integer
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
    Market:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        conditionId:
          type: string
        question:
          type: string
        polymarketSlug:
          type: string
          description: >-
            Source-event slug from Polymarket when the market was mirrored.
            Markets do not have a `slug` field; group and entity objects do.
        status:
          type: string
        feeRateBps:
          type: integer
          description: >-
            Effective trading fee rate in basis points. Sign this value into
            orders for this market. Read `GET /markets/{id}/fee` rather than
            hard-coding.
          example: 100
        feeRateBpsOverride:
          type: integer
          nullable: true
          description: >-
            Raw per-market fee override, or null when the market inherits the
            tag/global rate.
          example: null
        startTimestamp:
          type: string
          format: date-time
          nullable: true
          description: When trading opens (recorded/displayed, not enforced).
        matchStartTime:
          type: string
          format: date-time
          nullable: true
          description: Event kickoff time for sports fixtures (display only).
        matchEndTime:
          type: string
          format: date-time
          nullable: true
          description: >-
            Event/match end time for sports fixtures (display only; defaults to
            kickoff + 150 minutes).
        endTimestamp:
          type: string
          format: date-time
          description: When the market closes and moves to resolution.
        outcomes:
          type: array
          items:
            type: object
            additionalProperties: true
    MarketGroup:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        slug:
          type: string
        title:
          type: string

````