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

# Get Market Details

> Returns full market details for a single market, identified by numeric id, QID, or slug. The response includes all market assets (tradeable outcomes), their current YES/NO prices, the tradeable options (with prediction_key values needed to place orders), live order-book statistics, resolution outcome (winning_prediction_key) if the market has settled, and — for SERIES markets — the full regeneration history and the active cycle.



## OpenAPI

````yaml GET /v1/markets/{market_id}
openapi: 3.0.3
info:
  title: Predicta Markets API
  description: >-
    The Predicta Markets REST API lets you build on top of a continuous
    double-auction prediction market platform. Users buy and sell shares in
    YES/NO outcomes of real-world events. When a market resolves, holders of the
    winning side receive payouts; holders of the losing side lose their stake.


    Data model hierarchy: Market → MarketAsset → MarketAssetOption (prediction
    key) → Order. A Market is a question about a real-world event (e.g. 'Will
    Arsenal win the Premier League?'). Each Market contains one or more
    MarketAssets — the tradeable outcomes. Simple binary markets have a single
    asset; multi-player markets (e.g. Player of the Match) have one asset per
    candidate. Each MarketAsset exposes two options, YES and NO, each carrying a
    prediction_key — the unique hash you pass when placing an order to identify
    exactly which outcome you are trading.


    Trading flow: (1) call GET /v1/markets to find a market; (2) inspect
    market_assets and their options to get the prediction_key for the outcome
    you want; (3) call POST /v1/markets/{market_id}/orders with that
    prediction_key, your price, and quantity. Orders match immediately when a
    counterparty exists, otherwise they rest as open limit orders in the order
    book.


    Price system: all prices are integers in the range 1–99, representing cents.
    Price equals implied probability in percent — a YES price of 65 means the
    market implies a 65% chance the event will occur. YES and NO prices for the
    same asset always sum to approximately 100.


    Currency: the platform's internal unit is PT (Predicta Token). Balances,
    prices, and payout amounts are expressed in PT unless the market was created
    with a real-currency denomination.


    QID system: many resources expose a human-readable qualified ID (qid)
    alongside the numeric id. QIDs are computed, not stored as database columns.
    Prefix conventions — MA: market, MAA: market asset, AP: account payout. Most
    path parameters accept either the numeric id or the qid interchangeably.


    Authentication: include your API key in the X-Api-Key request header. All
    account-scoped endpoints require authentication. Market listing and detail
    endpoints are public.
  version: 1.0.0
  contact:
    email: api-support@predictamarkets.com
servers:
  - url: https://api.predictamarkets.com
    description: Production
security: []
paths:
  /v1/markets/{market_id}:
    get:
      tags:
        - Market
      summary: Get Market Details
      description: >-
        Returns full market details for a single market, identified by numeric
        id, QID, or slug. The response includes all market assets (tradeable
        outcomes), their current YES/NO prices, the tradeable options (with
        prediction_key values needed to place orders), live order-book
        statistics, resolution outcome (winning_prediction_key) if the market
        has settled, and — for SERIES markets — the full regeneration history
        and the active cycle.
      operationId: get_market_details_v1_markets__market_id__get
      parameters:
        - name: market_id
          in: path
          required: true
          schema:
            type: string
            description: The ID, QID or slug of the market to get details for
            title: Market Identifier
          description: The ID, QID or slug of the market to get details for
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    MarketResponseSchema:
      properties:
        title:
          type: string
          title: Title
          description: Market title
        parameters:
          $ref: '#/components/schemas/MarketParams'
          description: Market conditions and metadata
        market_processing_config:
          $ref: '#/components/schemas/MarketProcessor'
          description: Configure how the market orders are going to be processed
          default: MARKET_ASSET_ORDER_PROCESSING
        logo_path:
          title: Logo Path
          description: URL of the market logo
          type: string
          nullable: true
        description:
          title: Description
          description: Detailed description of the market
          type: string
          nullable: true
        currency:
          type: string
          title: Currency
          description: Currency used for transactions in this market
        expires_at:
          title: Expires At
          description: Expiration date of the market
          type: string
          format: date-time
          nullable: true
        market_category_id:
          title: Market Category Id
          description: Market category ID
          type: integer
          nullable: true
        market_type:
          $ref: '#/components/schemas/MarketType'
          description: ''
        regeneration_interval_type:
          $ref: '#/components/schemas/MarketRegenerationIntervalType'
          description: Regeneration interval
          nullable: true
        regeneration_interval_value:
          title: Regeneration Interval Value
          description: Inverval value
          type: integer
          nullable: true
        regeneration_timezone:
          title: Regeneration Timezone
          description: IANA timezone name for custom schedules
          type: string
          nullable: true
        regeneration_schedule:
          title: Regeneration Schedule
          description: Custom regeneration schedule
          anyOf:
            - $ref: '#/components/schemas/SimpleRegenerationSchedule-Output'
            - $ref: '#/components/schemas/RegenerationSchedule-Output'
            - $ref: '#/components/schemas/MixedRegenerationSchedule-Output'
          nullable: true
        ticker_symbol:
          title: Ticker Symbol
          description: Ticker symbol for the market
          type: string
          nullable: true
        tracking_identifier:
          title: Tracking Identifier
          description: Tracking identifier (e.g. ticker symbol) for querying and analytics
          type: string
          nullable: true
        regeneration_template_format:
          title: Regeneration Template Format
          description: Regeneration template format
          type: string
          enum:
            - DEFAULT
            - ABOVE_AT_OR_BELOW_PERCENTAGE
          nullable: true
        dispute_window_length:
          title: Dispute Window Length
          description: >-
            Duration of the dispute window after resolution. When set, a
            resolved market transitions to OPEN_TO_DISPUTE for this duration
            before payout is triggered. Omit or set to null to skip the dispute
            window entirely.
          type: string
          format: duration
          nullable: true
        display_group:
          $ref: '#/components/schemas/MarketDisplayGroup'
          description: Display group of the market
          default: ALL
        locked_at:
          title: Locked At
          description: Time when the market gets locked
          type: string
          format: date-time
          nullable: true
        is_active:
          type: boolean
          title: Is Active
          description: Whether the market is currently active
          default: true
        should_auto_determine_outcome:
          title: Should Auto Determine Outcome
          description: Whether to auto-determine the market outcome
          type: boolean
          nullable: true
        should_auto_close:
          title: Should Auto Close
          description: Whether to auto-close the market at expiry
          type: boolean
          nullable: true
        should_auto_payout:
          title: Should Auto Payout
          description: Whether to auto-payout after settlement
          type: boolean
          nullable: true
        auto_determination_api:
          $ref: '#/components/schemas/MarketAutoDeterminationAPI'
          description: API to use for automatic outcome determination
          nullable: true
        market_domain:
          $ref: '#/components/schemas/MarketDomain'
          description: Market domain (SPORTS, FINANCE, CRYPTO, GENERAL)
          nullable: true
        manual_market_order:
          title: Manual Market Order
          description: Manual display order for this market
          type: integer
          nullable: true
        resolution_delay:
          title: Resolution Delay
          description: >-
            How long to wait after market close before auto-resolution is
            attempted. NULL means resolve as soon as the market closes.
          type: string
          format: duration
          nullable: true
        payout_tariff_id:
          title: Payout Tariff Id
          description: ID of the payout tariff to apply to this market
          type: integer
          nullable: true
        id:
          type: integer
          title: Id
          description: Unique identifier for the market
        qid:
          type: string
          title: Qid
          description: Query identifier for the market
        slug:
          title: Slug
          description: Slug of the market
          type: string
          nullable: true
        status:
          title: Status
          description: Current status of the market
          type: string
          nullable: true
        allows_trading:
          type: boolean
          title: Allows Trading
          description: >-
            Whether the market allows trading (based on status, active state,
            and expiration)
          default: true
        total_buy_in:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total Buy In
          description: Total amount of buy-in in the market
          default: '0'
        total_participants:
          type: integer
          title: Total Participants
          description: Total number of participants in the market
          default: 0
        market_total_share:
          title: Market Total Share
          description: Total share of the market
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
        participant_total_share:
          title: Participant Total Share
          description: Total share of participants in the market
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
        winning_prediction_key:
          title: Winning Prediction Key
          description: >-
            The prediction key of the winning option for this market. Matches
            `market_asset.options[n].key` for the winning option. Populated
            after the market is resolved.
          type: string
          nullable: true
        winning_prediction_keys:
          title: Winning Prediction Keys
          description: >-
            The prediction keys of all winning options (multi-outcome markets).
            Each value matches a `market_asset.options[n].key`. Populated after
            the market is resolved.
          items:
            type: string
          type: array
          nullable: true
        mini_markets:
          title: Mini Markets
          description: List of mini markets under this market
          default: []
          items:
            $ref: '#/components/schemas/MiniMarketResponseSchema'
          type: array
          nullable: true
        market_assets:
          title: Market Assets
          description: List of market assets under this market
          default: []
          items:
            $ref: '#/components/schemas/MarketAssetSchema'
          type: array
          nullable: true
        all_market_assets:
          title: All Market Assets
          description: All market assets including closed ones (used for settled markets)
          items:
            $ref: '#/components/schemas/MarketAssetSchema'
          type: array
          nullable: true
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the market was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the market was last updated
        last_regenerated_at:
          title: Last Regenerated At
          description: Timestamp when the market was last regenerated
          type: string
          format: date-time
          nullable: true
        next_regeneration_at:
          title: Next Regeneration At
          description: Timestamp when the market will be regenerated next
          type: string
          format: date-time
          nullable: true
        market_category:
          $ref: '#/components/schemas/MarketCategorySchema'
          description: Category of the market
          nullable: true
        regeneration_history:
          title: Regeneration History
          description: List of market regeneration cycles
          items:
            $ref: '#/components/schemas/SeriesMarketRegenerationHistory'
          type: array
          nullable: true
        regenerated_title:
          title: Regenerated Title
          description: Regenerated title only available for series markets
          type: string
          nullable: true
        active_regeneration_history:
          $ref: '#/components/schemas/SeriesMarketRegenerationHistory'
          description: Active market regeneration cycle
          nullable: true
        regeneration_count:
          title: Regeneration Count
          description: Total number of regeneration cycles
          type: integer
          nullable: true
        open_to_dispute_at:
          title: Open To Dispute At
          description: >-
            Timestamp when the dispute window opened (OPEN_TO_DISPUTE state
            entry time)
          type: string
          format: date-time
          nullable: true
      type: object
      required:
        - title
        - parameters
        - currency
        - market_type
        - id
        - qid
        - created_at
        - updated_at
      title: MarketResponseSchema
      description: >-
        Full market detail object. Includes all fields from MarketCreateSchema
        plus computed fields (id, qid, slug, status, prices, participants,
        winning keys, mini markets, market assets, and regeneration history for
        SERIES markets).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      description: >-
        Returned by FastAPI when request validation fails (HTTP 422). Contains
        one or more ValidationError entries describing each invalid field.
    MarketParams:
      properties:
        market_type:
          $ref: '#/components/schemas/MarketTypeEnum'
          description: >-
            Structural type of the market: BINARY creates a single yes/no market
            asset; MULTI_OUTCOME_BINARY creates one market asset per condition
            entry, each with its own independent YES/NO order book.
        conditions:
          title: Conditions
          items:
            anyOf:
              - $ref: '#/components/schemas/Condition'
              - $ref: '#/components/schemas/ConditionOption'
          type: array
          nullable: true
          description: >-
            List of conditions that define what is being predicted. Each
            condition becomes one market asset. For BINARY markets, supply a
            single condition. For MULTI_OUTCOME_BINARY markets, supply one
            condition per candidate or outcome.
        metadata:
          title: Metadata
          additionalProperties:
            anyOf:
              - type: string
              - type: boolean
              - type: integer
              - type: number
            nullable: true
          type: object
          nullable: true
          description: >-
            Arbitrary key-value metadata attached to the market parameters. Used
            to store domain-specific context such as fixture IDs, source
            reference prices, or display hints. Keys and values must be scalar
            types.
      type: object
      required:
        - market_type
        - conditions
      title: MarketParams
      description: >-
        Defines the structure of a market: its type (binary vs multi-outcome),
        the list of conditions that generate market assets, and optional
        metadata. This is the core schema that determines how many market assets
        are created and how each is resolved.
    MarketProcessor:
      type: string
      enum:
        - DEFAULT_ORDER_PROCESSING
        - MARKET_ASSET_ORDER_PROCESSING
      title: MarketProcessor
      description: >-
        Order processing pipeline for the market. Use
        MARKET_ASSET_ORDER_PROCESSING for all new markets.
    MarketType:
      type: string
      enum:
        - DEFAULT
        - SERIES
      title: MarketType
      description: >-
        Whether the market is a one-off (DEFAULT) or a recurring
        auto-regenerating series (SERIES).
    MarketRegenerationIntervalType:
      type: string
      enum:
        - HOUR
        - DAY
        - WEEK
        - MONTH
        - YEAR
        - CUSTOM
      title: MarketRegenerationIntervalType
      description: >-
        Frequency unit for SERIES market regeneration: HOUR, DAY, WEEK, MONTH,
        YEAR, or CUSTOM.
    SimpleRegenerationSchedule-Output:
      properties:
        regenerates_at_minute:
          title: Regenerates At Minute
          description: >-
            Minute of the hour when the market should regenerate, Only works for
            hourly intervals
          type: integer
          nullable: true
        regenerates_at_hour:
          title: Regenerates At Hour
          description: >-
            Hour of the day when the market should regenerate, Only works for
            hourly intervals
          type: integer
          nullable: true
        regenerates_at_day:
          title: Regenerates At Day
          description: >-
            Day of the month when the market should regenerate, Only works for
            daily intervals
          type: integer
          nullable: true
        regenerates_at_month:
          title: Regenerates At Month
          description: >-
            Month of the year when the market should regenerate, Only works for
            monthly intervals
          type: integer
          nullable: true
        active_days:
          title: Active Days
          description: Days when the market should be active
          items:
            type: string
          type: array
          nullable: true
      type: object
      title: SimpleRegenerationSchedule
    RegenerationSchedule-Output:
      properties:
        regenerates_at_minute:
          title: Regenerates At Minute
          description: >-
            Minute of the hour when the market should regenerate, Only works for
            hourly intervals
          type: integer
          nullable: true
        regenerates_at_hour:
          title: Regenerates At Hour
          description: >-
            Hour of the day when the market should regenerate, Only works for
            hourly intervals
          type: integer
          nullable: true
        regenerates_at_day:
          title: Regenerates At Day
          description: >-
            Day of the month when the market should regenerate, Only works for
            daily intervals
          type: integer
          nullable: true
        regenerates_at_month:
          title: Regenerates At Month
          description: >-
            Month of the year when the market should regenerate, Only works for
            monthly intervals
          type: integer
          nullable: true
        active_days:
          title: Active Days
          description: Days when the market should be active
          items:
            type: string
          type: array
          nullable: true
        timezone:
          type: string
          title: Timezone
          description: IANA timezone name (e.g., 'America/New_York')
        start_time:
          title: Start Time
          description: Start time in HH:MM format (24-hour) - legacy support
          type: string
          nullable: true
        end_time:
          title: End Time
          description: End time in HH:MM format (24-hour) - legacy support
          type: string
          nullable: true
        time_windows:
          title: Time Windows
          description: >-
            List of time windows, each with start_time and end_time in HH:MM
            format
          items:
            additionalProperties:
              type: string
            type: object
          type: array
          nullable: true
      type: object
      required:
        - active_days
        - timezone
      title: RegenerationSchedule
      description: >-
        Model for flexible regeneration schedules with support for multiple time
        windows
    MixedRegenerationSchedule-Output:
      properties:
        regenerates_at_minute:
          title: Regenerates At Minute
          description: >-
            Minute of the hour when the market should regenerate, Only works for
            hourly intervals
          type: integer
          nullable: true
        regenerates_at_hour:
          title: Regenerates At Hour
          description: >-
            Hour of the day when the market should regenerate, Only works for
            hourly intervals
          type: integer
          nullable: true
        regenerates_at_day:
          title: Regenerates At Day
          description: >-
            Day of the month when the market should regenerate, Only works for
            daily intervals
          type: integer
          nullable: true
        regenerates_at_month:
          title: Regenerates At Month
          description: >-
            Month of the year when the market should regenerate, Only works for
            monthly intervals
          type: integer
          nullable: true
        regenerates_at_week:
          title: Regenerates At Week
          description: >-
            Week of the year when the market should regenerate, Only works for
            weekly intervals
          type: integer
          nullable: true
        regenerates_at_year:
          title: Regenerates At Year
          description: >-
            Year of the market when the market should regenerate, Only works for
            yearly intervals
          type: integer
          nullable: true
        interval_type:
          type: string
          description: The type of the regeneration interval
        interval_value:
          type: integer
          title: Interval Value
          description: The value of the regeneration interval
        timezone:
          type: string
          title: Timezone
          description: IANA timezone name (e.g., 'America/New_York')
        start_time:
          title: Start Time
          description: >-
            When the first regeneration should start, in the timezone of the
            market
          type: string
          format: date-time
          nullable: true
        active_days:
          title: Active Days
          description: Days when the market should be active
          items:
            type: string
          type: array
          nullable: true
        time_windows:
          title: Time Windows
          description: >-
            Dictionary mapping weekdays to their regeneration schedules with
            windows and breaks
          additionalProperties:
            $ref: '#/components/schemas/WeekdayScheduleConfig'
          type: object
          nullable: true
      type: object
      required:
        - interval_type
        - interval_value
        - timezone
      title: MixedRegenerationSchedule
    MarketDisplayGroup:
      type: string
      enum:
        - TRENDING
        - POPULAR
        - DISCOVER
        - NEW
        - FEATURED
        - RECENT
        - TOP
        - ALL
      title: MarketDisplayGroup
      description: >-
        Controls which UI feed this market appears in (e.g. TRENDING, FEATURED,
        ALL).
    MarketAutoDeterminationAPI:
      type: string
      enum:
        - INTERNAL_TICKER_DATABASE
        - API_FOOTBALL
        - API_CRYPTO
        - API_STOCKS
        - API_ETF
        - API_CURRENCY
        - API_INDEX
        - API_COMMODITY
        - API_BOND
        - ORACLE
      title: MarketAutoDeterminationAPI
      description: >-
        External data source used to automatically determine the market outcome
        when should_auto_determine_outcome is true. INTERNAL_TICKER_DATABASE:
        uses Predicta's internal price feed (for series finance markets).
        API_FOOTBALL: football match results via the football API. API_CRYPTO:
        cryptocurrency spot prices. API_STOCKS: equity prices. API_ETF: ETF
        prices. API_CURRENCY: forex rates. API_INDEX: stock index levels.
        API_COMMODITY: commodity prices (gold, oil, etc.). API_BOND: bond yield
        data. ORACLE: a configurable external oracle endpoint.
    MarketDomain:
      type: string
      enum:
        - SPORTS
        - FINANCE
        - CRYPTO
        - GENERAL
      title: MarketDomain
      description: >-
        Subject-area category for filtering: SPORTS, FINANCE, CRYPTO, or
        GENERAL.
    MiniMarketResponseSchema:
      properties:
        market_id:
          type: integer
          title: Market Id
          description: ID of the parent market
        prediction_key:
          type: string
          title: Prediction Key
          description: >-
            The prediction key that identifies this mini market condition.
            Corresponds to `market_asset.options[n].key` for the specific option
            being tracked.
        total_key_participants:
          type: integer
          title: Total Key Participants
          description: Total number of participants in this mini market
        total_key_buy_in:
          title: Total Key Buy In
          description: Total amount of buy-in for this mini market
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
        total_key_buy_out:
          title: Total Key Buy Out
          description: Total amount of buy-out for this mini market
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
        id:
          type: integer
          title: Id
          description: Unique identifier for the mini market
        qid:
          type: string
          title: Qid
          description: Query identifier for the mini market
      type: object
      required:
        - market_id
        - prediction_key
        - total_key_participants
        - id
        - qid
      title: MiniMarketResponseSchema
      description: >-
        Aggregated analytics for all orders sharing the same prediction_key
        within a market. A 'mini market' is a synthetic grouping — not a
        database entity — that collects participant count, total buy-in, and
        total buy-out for one specific prediction key. Useful for displaying
        per-outcome statistics on the market detail page.
    MarketAssetSchema:
      properties:
        id:
          type: integer
          title: Id
          description: The items ID
        qid:
          type: string
          title: Qid
          description: the qualified identifier
        asset_identifier:
          type: string
          title: Asset Identifier
          description: Unique asset identifier
        market_id:
          type: integer
          title: Market Id
          description: The market ID
        current_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
          title: Current Price
          description: Current price of the asset
          default: null
        yes_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
          title: Yes Price
          description: Current YES price of the asset
          default: null
        no_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
          title: No Price
          description: Current NO price of the asset
          default: null
        volume:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          nullable: true
          title: Volume
          description: Trading volume of the asset
          default: null
        status:
          type: string
          title: Status
          description: Status of the market asset
          default: active
        title:
          title: Title
          description: >-
            Display name for this market asset. For multi-outcome markets this
            is the candidate name (e.g. 'Kylian Mbappe'). For binary markets
            this may match the market title or be null.
          type: string
          nullable: true
        options:
          title: Options
          description: Tradeable options for this market asset.
          type: array
          items:
            $ref: '#/components/schemas/MarketAssetOption'
          nullable: true
          default: null
        avatar_path:
          title: Avatar Path
          description: The avatar url
          type: string
          nullable: true
        outcome:
          $ref: '#/components/schemas/MarketAssetOutcomeSchema'
          description: Outcome of the market asset
          nullable: true
      type: object
      required:
        - id
        - qid
        - asset_identifier
        - market_id
      title: MarketAssetSchema
      description: >-
        A single tradeable outcome within a market. Binary markets have one
        asset (the question itself); multi-outcome markets have one asset per
        candidate or condition. Each asset has live YES/NO prices and a list of
        options containing the prediction_key values needed to place orders.
    MarketCategorySchema:
      properties:
        id:
          type: integer
          title: Id
          description: The items ID
        name:
          type: string
          title: Name
          description: Name of the market category
        slug:
          title: Slug
          description: Slug of the market category
          type: string
          nullable: true
        description:
          title: Description
          description: Description of the market category
          type: string
          nullable: true
        icon:
          title: Icon
          description: Icon of the market category
          type: string
          nullable: true
      type: object
      required:
        - id
        - name
      title: MarketCategorySchema
    SeriesMarketRegenerationHistory:
      properties:
        id:
          title: Id
          description: The regeneration history ID
          type: integer
          nullable: true
        generated_at:
          type: string
          format: date-time
          title: Generated At
          description: When the regeneration took place
        status:
          $ref: '#/components/schemas/MarketStatus'
          description: Status of the regeneration cycle
        all_market_assets:
          title: All Market Assets
          description: Market assets for this regeneration cycle with outcomes
          items:
            $ref: '#/components/schemas/MarketAssetSchema'
          type: array
          nullable: true
      type: object
      required:
        - generated_at
        - status
      title: SeriesMarketRegenerationHistory
      description: >-
        One completed or active regeneration cycle of a SERIES market. Records
        the timestamp the cycle was generated, its current status (mirrors
        MarketStatus), and the market assets with their outcomes for that cycle.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: >-
            Path to the invalid field as a list of keys and/or array indices.
            For example, ['body', 'price'] indicates the price field in the
            request body failed validation.
        msg:
          type: string
          title: Message
          description: Human-readable explanation of what validation rule was violated.
        type:
          type: string
          title: Error Type
          description: >-
            Machine-readable Pydantic error type (e.g. 'value_error.missing',
            'type_error.integer').
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
      description: >-
        A single field validation failure within an HTTP 422 response. The loc
        array traces the path to the invalid field (e.g. ['body', 'price']).
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message
      required:
        - detail
      title: ErrorResponse
    MarketTypeEnum:
      type: string
      enum:
        - BINARY
        - MULTI_OUTCOME_BINARY
      title: MarketTypeEnum
      description: >-
        Structural type determining how many assets and options are generated:
        BINARY (one asset, one YES/NO pair) or MULTI_OUTCOME_BINARY (one asset
        per candidate, each with YES/NO).
    Condition:
      properties:
        key:
          anyOf:
            - type: string
            - type: integer
          title: Key
          description: >-
            Unique identifier for this condition within the market's parameter
            set. For multi-outcome markets this is typically the candidate's ID
            or name. For simple binary markets it is usually '1' or the question
            key.
        label:
          type: string
          title: Label
          description: >-
            Human-readable label for this condition, displayed in the UI (e.g.
            'Kylian Mbappe' or 'Bitcoin close price').
        type:
          $ref: '#/components/schemas/MarketConditionEnum'
          description: >-
            Shape of this condition: 'boolean' for yes/no resolution, 'choice'
            for multi-option resolution where one named option wins.
        avatar_path:
          title: Avatar Path
          type: string
          nullable: true
          description: >-
            Optional URL for an avatar or icon image representing this condition
            (e.g. a player photo or asset logo). Displayed alongside the
            condition label in the UI.
        options:
          title: Options
          items:
            $ref: '#/components/schemas/ConditionOption'
            nullable: true
          type: array
          nullable: true
          description: >-
            List of tradeable options for this condition, each representing one
            side (YES/NO for boolean, or named outcomes for choice type).
            Options carry the determination_formula used for auto-resolution.
      type: object
      required:
        - key
        - label
        - type
      title: Condition
      description: >-
        A single condition within a market's parameter set. Conditions define
        the structure of what is being predicted and generate the market assets
        when the market is created. Each condition corresponds to one market
        asset.
    ConditionOption:
      properties:
        key:
          $ref: '#/components/schemas/MarketSides'
          description: >-
            Side identifier: YES or NO for boolean conditions. For choice
            conditions this is the option's identifier.
        label:
          title: Label
          type: string
          nullable: true
          description: >-
            Human-readable label for this option (e.g. 'Yes', 'No', or a
            descriptive outcome string).
        determination_formula:
          title: Determination Formula
          type: string
          nullable: true
          description: >-
            Mathematical or logical formula used by the auto-determination
            engine to check whether this option wins. Typically references
            #{price} or other data placeholders. Example: '#{price} >= 4554.71'
            for a finance market. Null for manually resolved markets.
      type: object
      required:
        - key
      title: ConditionOption
      description: >-
        One tradeable option within a condition — the YES or NO side. Carries an
        optional determination_formula used by the auto-determination engine to
        resolve the outcome.
    WeekdayScheduleConfig:
      properties:
        regenerations_within:
          $ref: '#/components/schemas/TimeWindow'
          description: Primary time window during which regeneration can occur on this day.
          default:
            start_time: '00:00'
            end_time: '23:59'
          nullable: true
        breaks:
          title: Breaks
          description: >-
            List of time windows representing breaks (pauses) within the main
            window.
          items:
            $ref: '#/components/schemas/TimeWindow'
          type: array
          nullable: true
      type: object
      title: WeekdayScheduleConfig
    MarketAssetOption:
      type: object
      title: MarketAssetOption
      description: >-
        A single tradeable option within a market asset (e.g. YES / NO for
        binary markets).
      required:
        - id
        - key
      properties:
        id:
          type: string
          description: >-
            Option identifier — 'YES' / 'NO' for binary markets, or the
            condition key for multi-outcome markets.
        key:
          type: string
          description: >-
            The prediction key for this option. This is the value you supply as
            `prediction_key` when placing an order via POST
            /v1/markets/{market_id}/orders. It is a unique uppercase hex hash
            that identifies a specific tradeable outcome (e.g. the YES side of a
            particular market asset).
        value:
          type: string
          nullable: true
          description: >-
            Human-readable label for the option. Typically 'Yes' / 'No', but can
            be a full sentence (e.g. 'Yes Kylian Mbappe wins the Ballon d\'Or').
        determination_formula:
          type: string
          nullable: true
          description: >-
            Auto-determination formula used by the oracle to resolve this
            option. Present only on finance/series markets. Absent (not null) on
            simple binary markets.
      example:
        id: 'YES'
        key: B634817F0B02790D949F56F7BBDE7ECF
        value: 'Yes'
        determination_formula: '#{price} >= 4554.71'
    MarketAssetOutcomeSchema:
      properties:
        id:
          title: Id
          description: Primary key of the outcome record. Populated after resolution.
          type: integer
          nullable: true
        qid:
          title: Qid
          description: Human-readable qualified ID for this outcome record.
          type: string
          nullable: true
        winning_side:
          $ref: '#/components/schemas/MarketSides'
          description: The winning side
          nullable: true
        winning_prediction_key:
          title: Winning Prediction Key
          description: >-
            The prediction key (`market_asset.options[n].key`) of the option
            that was resolved as the winner. Holders of orders with this
            prediction key receive payouts.
          type: string
          nullable: true
        market_determined_at:
          title: Market Determined At
          description: >-
            Timestamp when the market outcome was officially determined by the
            platform. After this point the market moves toward COMPLETED/SETTLED
            status and payouts are calculated.
          type: string
          format: date-time
          nullable: true
      type: object
      title: MarketAssetOutcomeSchema
      description: >-
        Resolution outcome for a market asset. Populated after the market is
        resolved. Contains the winning side, the winning prediction_key, and the
        timestamp of determination.
    MarketStatus:
      type: string
      enum:
        - PENDING_APPROVAL
        - OPEN
        - CLOSED
        - LOCKED
        - CANCELLED
        - COMPLETED
        - RESOLUTION_DISPUTED
        - SETTLED
        - REJECTED
        - OPEN_TO_DISPUTE
      title: MarketStatus
      description: >-
        Full lifecycle status of a prediction market, from creation through
        settlement.
    MarketConditionEnum:
      type: string
      enum:
        - boolean
        - choice
      title: MarketConditionEnum
      description: >-
        Shape of a market condition as defined in MarketParams.conditions.
        boolean: a simple true/false condition — the asset resolves YES or NO
        based on whether the condition is met. Used for standard binary markets.
        choice: a multiple-choice condition where one of several named options
        is the winner. Used for multi-outcome markets where each condition has
        explicit option keys.
    MarketSides:
      type: string
      enum:
        - 'YES'
        - 'NO'
      title: MarketSides
      description: 'The two tradeable sides of a market asset: YES or NO.'
    TimeWindow:
      properties:
        start_time:
          type: string
          title: Start Time
          description: Start time of the time window, in HH:MM format (24-hour)
        end_time:
          type: string
          title: End Time
          description: End time of the time window, in HH:MM format (24-hour)
      type: object
      required:
        - start_time
        - end_time
      title: TimeWindow
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            detail: An unexpected error occurred. Please try again later.

````