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

# List public markets (filtered to currently-tradeable statuses)

> Returns one offset-paginated page of public markets. By default, only PRE_MARKET / OPEN / PAUSED markets are returned. Use `limit` (default 50, maximum 500) and `offset` (default 0) to page through the filtered set. The response contains `markets` only; it does not include `total`, `hasMore`, or `nextOffset`. To fetch a market in another lifecycle state directly, use `/api/markets/{slug}`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/markets
openapi: 3.1.0
info:
  title: PredictStreet core-api
  description: >-
    Client-facing HTTP gateway for the PredictStreet prediction-market platform.
    This spec is hand-written against the NestJS controllers and DTOs in
    core-api/src/modules/. For the source-of-truth live spec, run
    `./scripts/pull-openapi.sh` against a running core-api (NestJS exposes it at
    /api/docs-json). **Partner kinds.** Every authenticated endpoint resolves a
    request's *effective wallet* from the partner row. `single_wallet` partners
    bind to one `associatedWallet` set at creation. `multi_wallet` partners
    declare the actor on every request via an `X-User-Wallet: 0x<40-hex>`
    header. See the [Partner kinds](/auth/api-keys#partner-kinds) doc for the
    full contract.
  version: '2026-06-16'
  contact:
    name: PredictStreet partners
    email: partners@predictstreet.com
servers:
  - url: https://core.api.dev.predictstreet.sde.adifoundation.ai
    description: Testnet (partner integrator API — final domain TBD)
security: []
tags:
  - name: Deposits
    description: >-
      Gasless USDC deposit relay - submit a signed EIP-2612 permit and the
      platform broadcasts the on-chain deposit for you (no gas).
  - name: Events
    description: >-
      Polymarket-style event grouping with football metadata (group, stage,
      teams, tags).
  - name: Tags
    description: Curated tag taxonomy used to filter events.
  - name: Markets
    description: 'Public market data: list, detail, orderbook, trades, OHLC.'
  - name: Crypto
    description: >-
      Crypto price markets: the underlying-asset price curve and Up/Down series
      navigation. The markets themselves are ordinary binary markets — list them
      through /api/markets and /api/events.
  - name: Orders
    description: >-
      Signed-order place / cancel / read. Requires `X-Api-Key` with
      `orders:read` / `orders:write` scope; every write additionally requires an
      EIP-712 signature over the order.
  - name: Portfolio
    description: >-
      Balances, positions, trades, fees, vault info for the key's
      `associatedWallet`. Requires `X-Api-Key` with `portfolio:read` scope.
  - name: Matches
    description: >-
      admin.matches aggregate — groups several events into one fixture/card (1X2
      + first-scorer + over-under under one matchup).
  - name: Vault
    description: >-
      Backend co-signatures for ERC-1155 split / merge, and recovery for
      off-chain locks when the corresponding chain tx never confirmed. Requires
      `X-Api-Key` with `vault:write` scope plus an EIP-712 signature over the
      operation.
  - name: Leaderboard
    description: Public ranked leaderboard across PnL / volume buckets.
  - name: Search
    description: Global search across users, events, and matches.
  - name: Withdrawal Security
    description: >-
      Self-service withdrawal 2FA (TOTP) and withdrawal-address whitelist. Same
      endpoints serve the frontend (Privy JWT) and API-key integrators.
      Mutations need `vault:write`, reads `portfolio:read`. Both are opt-in per
      wallet and only gate withdrawals once the platform enables
      withdrawal-security enforcement.
paths:
  /api/markets:
    get:
      tags:
        - Markets
      summary: List public markets (filtered to currently-tradeable statuses)
      description: >-
        Returns one offset-paginated page of public markets. By default, only
        PRE_MARKET / OPEN / PAUSED markets are returned. Use `limit` (default
        50, maximum 500) and `offset` (default 0) to page through the filtered
        set. The response contains `markets` only; it does not include `total`,
        `hasMore`, or `nextOffset`. To fetch a market in another lifecycle state
        directly, use `/api/markets/{slug}`.
      operationId: MarketsController_list
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 50
        - name: sort
          required: false
          in: query
          description: >-
            kickoff (default) — earliest first. activity — most-traded first.
            shares — biggest turnover first.
          schema:
            enum:
              - kickoff
              - activity
              - shares
            type: string
            default: kickoff
        - name: closed
          required: false
          in: query
          description: >-
            Default `false`: tradeable markets only (PRE_MARKET/OPEN/PAUSED).
            `true`: closed markets
            (SUSPENDED/CLOSED/PENDING_RESOLUTION/DELAYED/DISPUTED/RESOLVED/VOIDED).
            Accepts `true`/`false`/`1`/`0`. Ignored when `status` is supplied.
          schema:
            type: boolean
            default: false
        - name: status
          required: false
          in: query
          description: >-
            CSV of explicit market statuses to return (case-insensitive,
            deduped). Takes precedence over `closed`. Allowed: PRE_MARKET, OPEN,
            PAUSED, SUSPENDED, CLOSED, PENDING_RESOLUTION, DELAYED, DISPUTED,
            RESOLVED, VOIDED. Any other token → 400 invalid_status (admin-only
            states are never filterable).
          schema:
            type: string
        - name: offset
          required: false
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
          description: >-
            Number of rows to skip. For example, `limit=500&offset=500` returns
            the 501st matching market onward. Default 0. A page shorter than
            `limit` is the last page.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketsListRespDto'
                type: object
                properties:
                  markets:
                    type: array
                    items:
                      $ref: '#/components/schemas/MarketSummary'
        '400':
          description: >-
            An `{ error: { code } }` envelope is returned for an out-of-range or
            malformed query param: `invalid_limit` (not 1–500), `invalid_sort`,
            `invalid_closed`, `invalid_status` (unknown or admin-only status
            token), `invalid_offset` (not a non-negative integer).
      security:
        - {}
components:
  schemas:
    MarketsListRespDto:
      type: object
      properties:
        markets:
          type: array
          items:
            $ref: '#/components/schemas/MarketSummaryDto'
      required:
        - markets
    MarketSummaryDto:
      type: object
      properties:
        id:
          type: string
          description: Internal market UUID.
        eventId:
          type: string
          description: Parent event UUID.
        symbol:
          type: string
          description: Public market symbol.
          example: KOR-CZE-WINNER
        title:
          type: string
          description: Display title.
        groupItemTitle:
          type: object
          nullable: true
          description: Per-outcome accordion sub-title.
        conditionId:
          type: object
          nullable: true
          description: CTF conditionId, 0x-bytes32.
        questionId:
          type: object
          nullable: true
          description: CTF questionId, 0x-bytes32.
        yesTokenId:
          type: object
          nullable: true
          description: YES outcome ERC-1155 tokenId (uint256 dec-string).
        noTokenId:
          type: object
          nullable: true
          description: NO outcome ERC-1155 tokenId (uint256 dec-string).
        outcomeCount:
          type: number
          description: Number of outcomes (2 for binary, N for N-ary).
        outcomeLabels:
          description: Outcome labels in index order.
          example:
            - 'YES'
            - 'NO'
          type: array
          items:
            type: string
        initialOutcomePrices:
          description: >-
            Initial fair-value prices per outcome (decimal string), used as
            fallback.
          type: array
          items:
            type: string
        outcomePrices:
          type: array
          items:
            type: string
            nullable: true
          description: >-
            Live or fallback prices per outcome (decimal string). null when no
            price available.
        status:
          type: string
          description: >-
            Lifecycle status. Public list returns OPEN/PAUSED/PROPOSED only;
            `/markets/:symbol` additionally allows
            SUSPENDED/CLOSED/PENDING_RESOLUTION/DELAYED/DISPUTED/RESOLVED/VOIDED/CANCELLED
            for historical lookups.
        currentReviewRound:
          type: number
          description: Current resolution review round (≥1).
        initialFairValue:
          type: string
          description: Admin-set fair value at market creation (decimal string).
        feeTakerBps:
          type: object
          nullable: true
          description: >-
            Per-market taker fee in basis points; null falls back to platform
            default.
        opensAt:
          type: object
          nullable: true
          description: ISO-8601 — when trading opens.
        closesAt:
          type: object
          nullable: true
          description: ISO-8601 — when trading closes.
        kickoff:
          type: object
          nullable: true
          description: ISO-8601 — kickoff/event-start anchor.
        resolutionWindowHours:
          type: object
          nullable: true
          description: Resolution window in hours after kickoff.
        pausedAt:
          type: object
          nullable: true
          description: ISO-8601 — when admin paused trading.
        resolvedAt:
          type: object
          nullable: true
          description: ISO-8601 — when oracle resolved the market.
        payoutNumerators:
          type: object
          nullable: true
          description: Per-outcome payout numerators after resolution.
        officialDataSource:
          type: object
          nullable: true
          description: Source feed identifier (Sportradar, etc.).
        sourceMatchId:
          type: object
          nullable: true
          description: External fixture id from the source feed.
        resolutionCriteria:
          type: object
          nullable: true
          description: Free-text resolution criteria.
        negRiskEligible:
          type: boolean
          description: True for NegRisk-eligible N-ary markets.
        isNewMarketType:
          type: boolean
          description: Reserved flag for the v2 market schema.
        createdAt:
          type: string
          description: ISO-8601 creation time.
        updatedAt:
          type: string
          description: ISO-8601 last update.
        tradeCount:
          type: number
          description: >-
            Lifetime non-terminal trade count for this market (only on /markets
            list).
        totalShares:
          type: string
          description: >-
            Lifetime sum of trade quantities (decimal string, only on /markets
            list).
        vertical:
          type: string
          nullable: true
          description: >-
            This market's vertical — the category axis verbatim (`football`,
            `tennis`, `crypto`, `politics`, …). Filter the catalog with
            `/api/events?vertical=`.
          example: crypto
        marketType:
          type: string
          nullable: true
          description: >-
            Canonical market type (`MATCH_WINNER_AET`, `CRYPTO_PRICE_EVENT`, …).
            Null for manual/legacy markets AND for machine-minted Up/Down
            windows — to detect a crypto market branch on `crypto` /
            `cryptoWindow` instead.
        crypto:
          $ref: '#/components/schemas/MarketCryptoRule'
        cryptoWindow:
          $ref: '#/components/schemas/MarketCryptoWindow'
      required:
        - id
        - eventId
        - symbol
        - title
        - outcomeCount
        - outcomeLabels
        - initialOutcomePrices
        - outcomePrices
        - status
        - currentReviewRound
        - initialFairValue
        - negRiskEligible
        - isNewMarketType
        - createdAt
        - updatedAt
    MarketCryptoRule:
      type: object
      nullable: true
      description: >-
        Machine-readable price rule of a crypto market — the structured
        counterpart of the human `resolutionCriteria` text. Null on every
        non-crypto market. Present on BOTH long-dated crypto markets and Up/Down
        windows, so `crypto !== null` is the reliable "is this a crypto market"
        test.
      properties:
        productType:
          type: string
          description: >-
            Product vocabulary, passed through verbatim from the listing side —
            treat it as an open string so a newly enabled product needs no
            client change. In use today: `THRESHOLD_BY_DEADLINE`,
            `THRESHOLD_DURING_MONTH`, `NEW_ALL_TIME_HIGH`,
            `MONTH_OVER_MONTH_CLOSE`, `MONTHLY_CLOSE_ABOVE_STRIKE`,
            `UP_DOWN_WINDOW`.
          example: THRESHOLD_BY_DEADLINE
        direction:
          type: string
          enum:
            - ABOVE
            - BELOW
          nullable: true
          description: >-
            Barrier direction. Null on direction-less products (month-over-month
            close, Up/Down windows). Only `ABOVE` is listable in the current
            release.
        targetPrice:
          type: string
          nullable: true
          description: >-
            Strike as a canonical decimal string (never a float — a threshold
            must round-trip exactly). Null on strike-less products. On a market
            that has one, the market `title` is the same digits.
          example: '64400'
        instrumentId:
          type: string
          nullable: true
          description: >-
            Price-catalog instrument. The key for `GET
            /api/markets/{symbol}/crypto-price-history` and for the
            `crypto_price_tick` WebSocket channel. Catalog: `BTC-USD`, `ETH-USD`
            (live), `BTC-DOM`, `TOTAL-MCAP` (modelled, no feed yet).
          example: BTC-USD
        deadlineAt:
          type: string
          format: date-time
          nullable: true
          description: '`THRESHOLD_BY_DEADLINE` only — observation cutoff (UTC).'
        month:
          type: string
          nullable: true
          description: Monthly products only — UTC calendar month, `YYYY-MM`.
          example: 2026-07
      required:
        - productType
        - direction
        - targetPrice
        - instrumentId
        - deadlineAt
        - month
    MarketCryptoWindow:
      type: object
      nullable: true
      description: >-
        Short-crypto Up/Down window facts. Populated only on markets
        materialised from a crypto series window (which also carry `crypto` with
        `productType: UP_DOWN_WINDOW`); null on every other market, long-dated
        crypto markets included.
      properties:
        seriesId:
          type: string
          format: uuid
          description: Parent series — same id as `event.cryptoSeries.id`.
        windowStartAt:
          type: string
          format: date-time
          nullable: true
          description: Start of the economic window (UTC).
        windowEndAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            End of the economic window (UTC). Equals the market's
            `tradingWindow.closesAt`.
        openPrice:
          type: string
          nullable: true
          description: >-
            The frozen open — the price the window's close is measured against.
            UNSCALED integer as a decimal string: render as `openPrice / 10 **
            streamDecimals` with a bigint/decimal helper, never `Number()` (18
            decimals exceeds `Number.MAX_SAFE_INTEGER`). Null until the oracle
            pins it (~45 s after `windowStartAt`) and on windows that have not
            started. Write-once — this is the value settlement binds.
          example: '63672459298735910000000'
        streamDecimals:
          type: integer
          nullable: true
          description: Exponent for `openPrice`.
          example: 18
        openPriceIsFinal:
          type: boolean
          description: >-
            True once the pin exists. The pin is immutable, so an open that
            exists is already final.
        outcome:
          type: string
          enum:
            - UP
            - DOWN
          nullable: true
          description: >-
            Settled direction, once the market is RESOLVED. Null while a
            proposal is still challengeable — a proposed direction is not a
            settled one. `UP` is outcome index 0 (payouts `[1,0]`), `DOWN` index
            1 (`[0,1]`).
      required:
        - seriesId
        - windowStartAt
        - windowEndAt
        - openPrice
        - streamDecimals
        - openPriceIsFinal
        - outcome

````