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

# Public trade tape

> Recent fill tape for a market — each trade carries the maker + taker EOAs so consumers can render "0xabc…1234 sold YES @ 0.62". Order ids and exact fees stay private. Filtered to `matched` / `settlement_pending` / `settled` (no PENDING / FAILED rows).



## OpenAPI

````yaml /api-reference/openapi.json get /api/markets/{symbol}/trades
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: 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/{symbol}/trades:
    get:
      tags:
        - Markets
      summary: Public trade tape
      description: >-
        Recent fill tape for a market — each trade carries the maker + taker
        EOAs so consumers can render "0xabc…1234 sold YES @ 0.62". Order ids and
        exact fees stay private. Filtered to `matched` / `settlement_pending` /
        `settled` (no PENDING / FAILED rows).
      operationId: MarketsController_trades
      parameters:
        - $ref: '#/components/parameters/MarketSymbol'
        - name: limit
          in: query
          description: >-
            Page size. `< 1` (including `0` / negatives) → `400 invalid_limit`.
            Server silently clamps values above `maximum` to `maximum`.
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 200
        - name: before
          in: query
          description: >-
            ISO-8601 timestamp; returns trades strictly older than this
            (exclusive). Pair with `limit` to page backwards. Combine with
            `after` for a bounded `(after, before)` range. Unknown pagination
            params (`offset`, `page`, `cursor`) are silently ignored — this
            endpoint is time-cursor only.
          schema:
            type: string
            format: date-time
        - name: after
          in: query
          description: >-
            ISO-8601 timestamp; returns trades strictly newer than this
            (exclusive). Honoured only on `sort=time` (default). Pair with
            `before` for a bounded `(after, before)` range — typical use case is
            WS-vs-REST reconcile after a disconnect (`after = last seen
            createdAt`).
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  symbol:
                    type: string
                  trades:
                    type: array
                    items:
                      $ref: '#/components/schemas/PublicTrade'
                required:
                  - symbol
                  - trades
      security:
        - {}
components:
  parameters:
    MarketSymbol:
      name: symbol
      in: path
      required: true
      description: >-
        Market symbol, e.g. `UAE-CUP-FINAL-20260425`. Used by sub-resource
        endpoints (`/orderbook`, `/trades`, `/ohlc`, `/traders`). The root
        market-detail endpoint `/api/markets/{slug}` accepts the slug instead —
        see `MarketSlug`.
      schema:
        type: string
  schemas:
    PublicTrade:
      type: object
      description: >-
        One filled trade on the public tape. Exposes maker + taker EOAs
        alongside price / quantity / outcome so consumers can render "0xabc…1234
        sold YES @ 0.62" without a second round-trip. Order ids are NOT exposed;
        per-side USDC fees ARE exposed via `makerFee` / `takerFee`.
      required:
        - id
        - price
        - quantity
        - status
        - createdAt
        - settledAt
        - maker
        - taker
        - adjustment
        - makerFee
        - takerFee
      properties:
        id:
          type: string
        price:
          $ref: '#/components/schemas/DecimalString'
        quantity:
          $ref: '#/components/schemas/DecimalString'
        status:
          type: string
          enum:
            - matched
            - settlement_pending
            - settled
          description: >-
            Pre-settlement fills (`matched`, `settlement_pending`) are surfaced
            so the tape isn't delayed behind on-chain confirmations; `PENDING`
            and `FAILED` rows are filtered out by the server.
        createdAt:
          type: string
          format: date-time
          description: >-
            ISO-8601 timestamp of the off-chain match. Immutable cursor anchor —
            does NOT advance through status transitions. Use this for `before` /
            `after` pagination. For the chain-confirm timestamp use `settledAt`.
        settledAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            ISO-8601 timestamp of on-chain settlement (CTFExchange `OrderFilled`
            confirmed in a block). `null` while the trade is still `matched` /
            `settlement_pending`. Independent of `createdAt` so pagination
            cursors stay stable across status transitions.
        side:
          type: string
          enum:
            - buy
            - sell
          nullable: true
          description: >-
            Taker's side. `buy` = taker received the outcome token; `sell` =
            taker gave up the outcome token. `null` only for legacy rows that
            predate the column.
        maker:
          type: string
          description: >-
            EOA that placed the resting maker order. Lowercase 0x-prefixed
            20-byte address.
        taker:
          type: string
          description: >-
            EOA that placed the incoming taker order. Lowercase 0x-prefixed
            20-byte address.
        outcomeIndex:
          type: integer
          nullable: true
          description: >-
            Index into the market's `outcomeLabels` (0 = first outcome,
            typically YES on binary markets; 1 = NO). `null` only on the rare
            edge case where the maker order was archived before this read.
        outcomeLabel:
          type: string
          nullable: true
          description: >-
            Human label for the outcome — `YES` / `NO` on binary markets, the
            team or competitor name on tournament markets. Mirrors
            `outcomeLabels[outcomeIndex]` on the market. `null` under the same
            condition as `outcomeIndex`.
        adjustment:
          type: string
          enum:
            - NONE
            - MINT
            - BURN
          description: >-
            Matcher's on-chain settlement classifier: `NONE` = standard
            token-for-cash swap; `MINT` = both sides buyers (splitPosition on
            chain); `BURN` = both sides sellers (mergePositions on chain).
            Always `NONE` on non-binary markets and on binary trades where both
            sides shared the same outcome.
        makerFee:
          $ref: '#/components/schemas/DecimalString'
          description: >-
            USDC fee charged to the maker side of this fill (decimal string,
            USDC face value). `"0"` either on legacy rows predating the
            fee-ledger or when the fee for this leg was denominated in
            OUTCOME_TOKENS on a cross-outcome MINT/BURN — that token-denominated
            fee is not surfaced on the public feed.
        takerFee:
          $ref: '#/components/schemas/DecimalString'
          description: >-
            USDC fee charged to the taker side of this fill (decimal string,
            USDC face value). Same `"0"` semantics as `makerFee`.
    DecimalString:
      type: string
      description: >-
        Decimal number encoded as a string to preserve precision (e.g.
        `'100.5'`).

````