> ## 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 Trades

> Every trade in the market, newest first. Each match appears as the taker's fill and one fill per maker order. Page with `next`.



## OpenAPI

````yaml /openapi.json get /v1/markets/{conditionId}/trades
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}/trades:
    get:
      tags:
        - Markets
      summary: Market Trades
      description: >-
        Every trade in the market, newest first. Each match appears as the
        taker's fill and one fill per maker order. Page with `next`.
      operationId: market-trades
      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: '0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409'
        - name: limit
          in: query
          required: false
          description: Rows, 1 to 1,000. Out of range is clamped.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 50
          example: 5
        - name: before
          in: query
          required: false
          description: 'The previous page''s `next`: `ts,block,logIndex`.'
          schema:
            type: string
        - name: outcome
          in: query
          required: false
          description: One outcome index only.
          schema:
            type: integer
        - name: side
          in: query
          required: false
          description: One side only.
          schema:
            type: string
            enum:
              - BUY
              - SELL
      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:
                  conditionId:
                    type: string
                    description: 'Condition id: 0x and 64 hex, lowercase.'
                  block:
                    type: integer
                    description: >-
                      The trades table's cursor (can run a batch ahead of
                      positions).
                  complete:
                    type: boolean
                    description: No gap open in the trade history.
                  trades:
                    type: array
                    items:
                      $ref: '#/components/schemas/Trade'
                  next:
                    type:
                      - string
                      - 'null'
                    description: Send it as `before`.
              example:
                conditionId: >-
                  0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409
                block: 94812405
                complete: true
                trades:
                  - ts: 1790862117
                    block: 94812345
                    logIndex: 211
                    tx: >-
                      0x3f6a0c0d1d7f4b0a9e2c6b8f51a2e94d7c03b6a1e8f5d2c47a9b0e1f3c5d7e9a
                    wallet: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
                    side: BUY
                    asset: >-
                      85254962656314962064648492774584063365849461315753521676016468731069088672
                    conditionId: >-
                      0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409
                    outcomeIndex: 0
                    price: 0.231
                    size: 2000
                    usd: 462
                    fee: 0.92
                    feeUnit: usd
                    role: taker
                    counterparty: '0xe111180000d2663c0091e4f400237545b87b996b'
                    exchange: ctf-v2
                  - ts: 1790862117
                    block: 94812345
                    logIndex: 212
                    tx: >-
                      0x3f6a0c0d1d7f4b0a9e2c6b8f51a2e94d7c03b6a1e8f5d2c47a9b0e1f3c5d7e9a
                    wallet: '0x1f0ebc543b2d411f66947041625c0aa1ce61cf79'
                    side: SELL
                    asset: >-
                      85254962656314962064648492774584063365849461315753521676016468731069088672
                    conditionId: >-
                      0x8db33416a2d1ebde7438c80129e898f89a5deb3852ca64b37c4bf46513204409
                    outcomeIndex: 0
                    price: 0.231
                    size: 2000
                    usd: 462
                    fee: 0
                    feeUnit: usd
                    role: maker
                    counterparty: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
                    exchange: ctf-v2
                next: 1790862117,94812345,212
        '400':
          description: A parameter is malformed or out of range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                e0:
                  summary: side must be BUY or SELL
                  value:
                    error: side must be BUY or SELL
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                e0:
                  summary: market not indexed
                  value:
                    error: market not indexed
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          description: 'Not ready, or off: retry later'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                e0:
                  summary: trades are off
                  value:
                    error: trades are off
                e1:
                  summary: trade history is still loading
                  value:
                    error: trade history is still loading
components:
  schemas:
    Trade:
      type: object
      properties:
        ts:
          type: integer
          description: Block time. Unix seconds.
        block:
          type: integer
          description: Block.
        logIndex:
          type: integer
          description: The log's index in the block.
        tx:
          type: string
          description: Transaction hash.
        wallet:
          type: string
          description: The order's owner.
        side:
          type: string
          description: BUY or SELL, from the owner's side.
          enum:
            - BUY
            - SELL
        asset:
          type: string
          description: The token, decimal.
        conditionId:
          type:
            - string
            - 'null'
          description: >-
            Its market; null until the token's market is known (seconds, for a
            brand-new market).
        outcomeIndex:
          type:
            - integer
            - 'null'
          description: Its outcome.
        price:
          type: number
          description: 'usd / size, before the fee: USD a share.'
        size:
          type: number
          description: >-
            Shares as filled. On a V1 buy the fee came out of them: received =
            size − fee.
        usd:
          type: number
          description: Paid (BUY) or received (SELL), before the fee, in USD.
        fee:
          type: number
          description: The fee, in feeUnit.
        feeUnit:
          type: string
          description: usd, or shares on V1 buys.
          enum:
            - usd
            - shares
        role:
          type: string
          description: taker crossed the book; maker rested on it.
          enum:
            - taker
            - maker
        counterparty:
          type: string
          description: >-
            On a maker fill, the taker order's owner; on a taker fill, the
            exchange contract.
        exchange:
          type: string
          description: ctf-v1, negrisk-v1, ctf-v2, negrisk-v2 or combos-v3.
      description: >-
        One fill, from its order owner's side. A match is the taker's fill and
        one fill per maker order.
    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.