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

# Market

> One market, as Markets lists it.



## OpenAPI

````yaml /openapi.json get /v1/markets/{conditionId}
openapi: 3.1.0
info:
  title: Codex API
  version: 1.0.0
  description: >-
    Nomos's Polymarket index, rebuilt from Polygon: holders, positions, PnL,
    trades, leaderboards and live fills.
servers:
  - url: https://codex-api.nomos.trade
security:
  - bearerAuth: []
tags:
  - name: Markets
  - name: Wallets
  - name: Leaderboard
  - name: Events
  - name: Fills
  - name: Crypto Strikes
  - name: Health
paths:
  /v1/markets/{conditionId}:
    get:
      tags:
        - Markets
      summary: Market
      description: One market, as Markets lists it.
      operationId: market
      parameters:
        - name: conditionId
          in: path
          required: true
          description: 'The market: 0x and 64 hex.'
          schema:
            type: string
            pattern: ^0x[0-9a-fA-F]{64}$
          example: '0x5c1d0f1e2a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5'
      responses:
        '200':
          description: OK
          headers:
            x-ratelimit-limit:
              description: Your rate, requests a minute.
              schema:
                type: integer
            x-ratelimit-remaining:
              description: Requests left in your bucket.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  block:
                    type: integer
                    description: The finalized block the answer reflects.
                  market:
                    $ref: '#/components/schemas/Market'
              example:
                block: 94812402
                market:
                  conditionId: >-
                    0x5c1d0f1e2a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5
                  question: Bitcoin Up or Down - October 4, 1:00AM-1:05AM ET
                  slug: btc-updown-5m-1790572800
                  eventSlug: btc-updown-5m-1790572800
                  eventTitle: Bitcoin Up or Down - October 4, 1:00AM-1:05AM ET
                  image: null
                  category: Crypto
                  outcomes:
                    - Up
                    - Down
                  tokenIds:
                    - >-
                      21742633143463906290569050155826241533067272736897614950488156847949938836455
                    - >-
                      48331043336612883890938759509493159234755048973500640148014422747788308965732
                  negRisk: false
                  negRiskMarketId: null
                  endDate: 1790573100
                  closedTime: 1790573162
                  resolution:
                    payouts:
                      - 1
                      - 0
                    winningOutcome: 0
                    resolvedAt: 1790573190
                    block: 94683341
                  round:
                    asset: btc
                    timeframe: 5m
                    start: 1790572800
                    end: 1790573100
                    state: settled
                    strike: 121804.37
                    close: 121822.05
                    priceToBeat: 121804.37
                    finalPrice: 121822.05
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                e0:
                  summary: market not listed (only markets Gamma lists are)
                  value:
                    error: market not listed (only markets Gamma lists are)
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Market:
      type: object
      properties:
        conditionId:
          type: string
          description: 'Condition id: 0x and 64 hex, lowercase.'
        question:
          type:
            - string
            - 'null'
          description: ''
        slug:
          type:
            - string
            - 'null'
          description: ''
        eventSlug:
          type:
            - string
            - 'null'
          description: ''
        eventTitle:
          type:
            - string
            - 'null'
          description: ''
        image:
          type:
            - string
            - 'null'
          description: ''
        category:
          type:
            - string
            - 'null'
          description: >-
            Politics, Sports, Crypto, Finance, Culture, Mentions, Weather,
            Economics or Tech; null for none of them.
        outcomes:
          type: array
          items:
            type: string
          description: Outcome names, in outcome order.
        tokenIds:
          type: array
          items:
            type: string
          description: >-
            The outcome tokens' CLOB ids (decimal), in outcome order. Empty when
            the tokens were never minted.
        negRisk:
          type: boolean
          description: ''
        negRiskMarketId:
          type:
            - string
            - 'null'
          description: The neg-risk event it belongs to.
        endDate:
          type:
            - integer
            - 'null'
          description: Its end date, from Polymarket. Unix seconds.
        closedTime:
          type:
            - integer
            - 'null'
          description: When Polymarket closed it. Unix seconds.
        resolution:
          type:
            - object
            - 'null'
          properties:
            payouts:
              type: array
              items:
                type: number
              description: >-
                Payout per share by outcome: [1, 0], [0, 1], or [0.5, 0.5] for a
                50-50 split.
            winningOutcome:
              type:
                - integer
                - 'null'
              description: The outcome that paid in full; null when none did alone.
            resolvedAt:
              type:
                - integer
                - 'null'
              description: Resolution block time. Unix seconds.
            block:
              type:
                - integer
                - 'null'
              description: Resolution block.
          description: As recorded on chain; null until the market resolves.
        round:
          type:
            - object
            - 'null'
          properties:
            asset:
              type: string
              description: btc, eth, sol, xrp, doge, bnb, hype or zec.
            timeframe:
              type: string
              description: 5m, 15m, 1h, 4h or 1d.
            start:
              type: integer
              description: Round start. Unix seconds.
            end:
              type: integer
              description: Round end. Unix seconds.
            state:
              type:
                - string
                - 'null'
              description: >-
                The strike recorder's state (as on Strike Round); null for
                rounds before it started recording.
            strike:
              type:
                - number
                - 'null'
              description: >-
                The opening reference price (price to beat), USD, once
                confirmed.
            close:
              type:
                - number
                - 'null'
              description: The closing reference price, USD.
            priceToBeat:
              type:
                - number
                - 'null'
              description: Polymarket's own opening price.
            finalPrice:
              type:
                - number
                - 'null'
              description: Polymarket's own closing price.
          description: >-
            For a crypto Up/Down round: its window, and its reference prices
            where Codex recorded them. Null for any other market.
      description: >-
        A market as Polymarket lists it, with its tokens, its on-chain
        resolution and, for a crypto Up/Down round, its window and prices.
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong, for a person to read.
      description: Every error answer.
  responses:
    Unauthorized:
      description: No key, or an unknown or revoked one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unknown or revoked API key
    RateLimited:
      description: >-
        Over your rate, or more than 4 requests (2 streams) at once. Wait
        `Retry-After` seconds.
      headers:
        retry-after:
          description: Seconds to wait.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'rate limit: 600 requests a minute; retry in 1 s'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `codex_` and 48 hex characters.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.