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

# Resolve a market by venue ID, slug, or text and return cascade

> Public app-tier Discovery endpoint. Accepts any identifier the user has: venue+externalId, slug, conditionId, or fuzzy text search. Resolves to a market and returns cached correlated market candidates. If generation is missing, a market-intel BullMQ job is queued and the endpoint returns 202.



## OpenAPI

````yaml /openapi/openapi.json post /correlated-markets/resolve
openapi: 3.0.2
info:
  title: AGG API
  version: 1.0.0
  description: >-
    Prediction market aggregator REST API — authentication, users, venue events,
    venue markets, orderbooks, charts, and execution workflows.
servers:
  - url: https://api.agg.market
    description: Production
  - url: https://api.staging.agg.market
    description: Staging
security: []
paths:
  /correlated-markets/resolve:
    post:
      tags:
        - Discovery
      summary: Resolve a market by venue ID, slug, or text and return cascade
      description: >-
        Public app-tier Discovery endpoint. Accepts any identifier the user has:
        venue+externalId, slug, conditionId, or fuzzy text search. Resolves to a
        market and returns cached correlated market candidates. If generation is
        missing, a market-intel BullMQ job is queued and the endpoint returns
        202.
      operationId: resolve
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                venue:
                  type: string
                externalId:
                  type: string
                slug:
                  type: string
                conditionId:
                  type: string
                q:
                  type: string
                side:
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                mode:
                  type: string
                  enum:
                    - expand
                    - hedge
                limit:
                  type: number
                cursor:
                  type: string
                includeResolved:
                  type: boolean
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    required:
                      - market
                    properties:
                      market:
                        type: object
                        required:
                          - id
                          - question
                        properties:
                          id:
                            type: string
                          question:
                            type: string
                  - type: object
                    required:
                      - data
                      - nextCursor
                      - hasMore
                    properties:
                      data:
                        type: array
                        items:
                          type: object
                          required:
                            - venueEventId
                            - eventTitle
                            - eventStatus
                            - eventStartDate
                            - eventEndDate
                            - score
                            - action
                            - reason
                            - reasonDomain
                          properties:
                            venueEventId:
                              type: string
                            eventTitle:
                              type: string
                            eventStatus:
                              type: string
                              enum:
                                - unopened
                                - paused
                                - open
                                - closed
                                - resolved
                            eventStartDate:
                              type: string
                            eventEndDate:
                              type: string
                              nullable: true
                            score:
                              type: number
                            action:
                              type: string
                            reason:
                              type: string
                            reasonDomain:
                              type: string
                      nextCursor:
                        type: string
                        nullable: true
                      hasMore:
                        type: boolean
        '202':
          description: '202'
          content:
            application/json:
              schema:
                type: object
                required:
                  - market
                  - status
                  - message
                properties:
                  market:
                    type: object
                    required:
                      - id
                      - question
                    properties:
                      id:
                        type: string
                      question:
                        type: string
                  status:
                    type: string
                    enum:
                      - processing
                  message:
                    type: string
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
      security:
        - appId: []
components:
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-app-id
      description: Your application ID. Required for all app-tier and user-tier routes.

````