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

# Cross-wallet executed-trade feed (incremental, cursor-paginated)

> Returns trades whose `modifiedAt` (`GREATEST(createdAt, settledAt)`) falls in `[modifiedSince, ∞)`, ordered ascending. Pass `nextCursor` back as `?cursor=` to fetch the next page; iterate until the response returns `nextCursor: null`. A trade may surface twice (matched, then settled) — upsert by `tradeId` on your side. Statuses included: `matched`, `settlement_pending`, `settled`, `settlement_failed`. **Both legs are charged**: `takerFee` and `makerFee` each carry that leg's own fee, so the fee take for a fill is `takerFee + makerFee` — do not read `takerFee` as the trade total. A leg's fee is in `USDC` when that leg SELLs and in `OUTCOME_TOKENS` when it BUYs, so the two legs of one fill are often in different currencies — do NOT collapse currencies before reconciling.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/partner/trades
openapi: 3.1.0
info:
  title: PredictStreet API
  description: >-
    Client-facing HTTP API for the PredictStreet prediction-market platform.
    **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: >-
      A match 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 web app (user sessions) 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.
  - name: Platform
    description: >-
      Public platform state: the contract registry, the platform fee
      configuration, the platform freeze flag and active notices. No
      authentication.
paths:
  /api/v1/partner/trades:
    get:
      tags:
        - partner
      summary: Cross-wallet executed-trade feed (incremental, cursor-paginated)
      description: >-
        Returns trades whose `modifiedAt` (`GREATEST(createdAt, settledAt)`)
        falls in `[modifiedSince, ∞)`, ordered ascending. Pass `nextCursor` back
        as `?cursor=` to fetch the next page; iterate until the response returns
        `nextCursor: null`. A trade may surface twice (matched, then settled) —
        upsert by `tradeId` on your side. Statuses included: `matched`,
        `settlement_pending`, `settled`, `settlement_failed`. **Both legs are
        charged**: `takerFee` and `makerFee` each carry that leg's own fee, so
        the fee take for a fill is `takerFee + makerFee` — do not read
        `takerFee` as the trade total. A leg's fee is in `USDC` when that leg
        SELLs and in `OUTCOME_TOKENS` when it BUYs, so the two legs of one fill
        are often in different currencies — do NOT collapse currencies before
        reconciling.
      operationId: PartnerTradesController_list
      parameters:
        - name: modifiedSince
          required: true
          in: query
          description: >-
            ISO-8601 timestamp. Returns trades whose effective modification time
            (GREATEST of `createdAt`, `settledAt`) is at or after this value.
            Required — the partner feed is incremental-only by design to keep
            pagination keyset-deterministic.
          schema:
            example: '2026-05-01T00:00:00Z'
            type: string
        - name: cursor
          required: false
          in: query
          description: >-
            Opaque cursor returned in `nextCursor` from the previous page. Pass
            back unchanged. When omitted the page starts at the front of the
            `modifiedSince` window.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: >-
            Page size. Defaults to 50, capped at 300. The partner-tier rate
            limit (default 600/min) is the real ceiling — small pages with many
            calls is gentler on the DB than rare giant pages, and the cursor
            model means a partner who hits `nextCursor !== null` just fetches
            the next batch on the next call without losing rows.
          schema:
            minimum: 1
            maximum: 300
            default: 50
            type: number
        - name: marketId
          required: false
          in: query
          description: >-
            Optional market-symbol filter (e.g. `WC26-FINAL-ARG-BRA-…`). When
            present, only trades from that one market are returned.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerTradesRespDto'
      security:
        - ApiKey:
            - partner:trades:read
components:
  schemas:
    PartnerTradesRespDto:
      type: object
      properties:
        trades:
          type: array
          items:
            $ref: '#/components/schemas/PartnerTradeDto'
        nextCursor:
          type: string
          nullable: true
          description: >-
            Opaque cursor for the next page. Pass back unchanged as
            `?cursor=<value>` to continue. NULL when there is no further page in
            the `modifiedSince` window.
      required:
        - trades
        - nextCursor
    PartnerTradeDto:
      type: object
      properties:
        tradeId:
          type: string
          description: >-
            Stable trade identifier. Use as the upsert key when ingesting — a
            trade row may surface twice (matched, then settled).
        status:
          type: string
          enum:
            - matched
            - settlement_pending
            - settled
            - settlement_failed
          description: >-
            FSM state at the time the row was read. `settlement_failed` is
            included so partners see trades that did NOT reach the chain —
            critical for accurate reconciliation.
        marketSymbol:
          type: string
          description: Market symbol (e.g. `WC26-GROUP-A-ARG-MEX-1`).
        marketTitle:
          type: string
          nullable: true
          description: >-
            Human-readable market title (binary outcome question text). NULL on
            legacy rows where the market metadata join fell through.
        eventId:
          type: string
          nullable: true
          description: >-
            Parent event id (e.g. tournament fixture). NULL on standalone
            markets without a parent event.
        eventTitle:
          type: string
          nullable: true
          description: Parent event title.
        categoryTags:
          description: >-
            Tags the parent event is bound to (drives "Category" surfacing — we
            expose the tag-id list rather than a single category because one
            event can sit under multiple curated tags). Empty array on untagged
            events.
          type: array
          items:
            type: string
        matchedAt:
          type: string
          description: >-
            ISO-8601 timestamp when matching engine emitted the fill. Immutable
            across the trade lifecycle.
        settledAt:
          type: string
          nullable: true
          description: >-
            ISO-8601 timestamp when on-chain settlement was confirmed. NULL
            while `status` is in `matched` / `settlement_pending` /
            `settlement_failed`. Once non-null, the row is also retrievable on
            subsequent `?modifiedSince=<thisValue>` calls.
        txHash:
          type: string
          nullable: true
          description: >-
            On-chain transaction hash of the settle-batch carrying this fill.
            NULL pre-settlement.
        price:
          type: string
          description: Fill price (USDC, decimal string).
        quantity:
          type: string
          description: Outcome-token quantity filled (decimal string).
        takerFee:
          description: Fee paid by the taker on this fill.
          allOf:
            - $ref: '#/components/schemas/PartnerTradeFeeDto'
        makerFee:
          description: >-
            Fee paid by the maker on this fill. **Both legs are charged** — each
            order pays its own signed rate — so the fee take for a fill is
            `takerFee + makerFee`, and the two can be in different currencies.
            `{ amount: "0", currency: "USDC", tokenId: null }` only for trades
            before 2026-04-28 or while the fee has not been recorded yet (it is
            written at settlement; the row re-surfaces on a later
            `?modifiedSince=` pull).
          allOf:
            - $ref: '#/components/schemas/PartnerTradeFeeDto'
        taker:
          description: Taker side.
          allOf:
            - $ref: '#/components/schemas/PartnerTradeSideDto'
        maker:
          description: Maker side.
          allOf:
            - $ref: '#/components/schemas/PartnerTradeSideDto'
      required:
        - tradeId
        - status
        - marketSymbol
        - marketTitle
        - eventId
        - eventTitle
        - categoryTags
        - matchedAt
        - settledAt
        - txHash
        - price
        - quantity
        - takerFee
        - makerFee
        - taker
        - maker
    PartnerTradeFeeDto:
      type: object
      properties:
        amount:
          type: string
          description: Decimal-string fee amount.
        currency:
          type: string
          enum:
            - USDC
            - OUTCOME_TOKENS
          description: >-
            Unit the fee was collected in. See class-level comment for the
            maker/taker split. Auditors should NOT collapse `OUTCOME_TOKENS`
            into a USDC equivalent without applying the trade price.
        tokenId:
          type: string
          nullable: true
          description: >-
            ERC-1155 token id (decimal string) when `currency` is
            `OUTCOME_TOKENS`. NULL when `currency` is `USDC`.
      required:
        - amount
        - currency
        - tokenId
    PartnerTradeSideDto:
      type: object
      properties:
        side:
          type: string
          enum:
            - BUY
            - SELL
          description: Side relative to this counterparty.
        walletAddress:
          type: string
          description: EOA the user signed the order with.
        vaultAddress:
          type: string
          description: >-
            Vault smart-contract address that held the collateral / outcome
            tokens for this fill. Reconciles 1:1 with the on-chain vault balance
            at `blockNumber`.
        orderId:
          type: string
          description: Originating order id (UUID).
        orderType:
          type: string
          enum:
            - LIMIT
            - MARKET
          description: Order type at placement.
        orderTimeInForce:
          type: string
          description: >-
            Time-in-force at placement (`GTC`, `IOC`, `FOK`, `GTD` — verbatim
            from the EIP-712 signed payload).
        orderPlacedAt:
          type: string
          description: >-
            ISO-8601 timestamp the order was first persisted server-side.
            Together with the trade `matchedAt` this lets surveillance models
            compute resting-time on the book — a key signal for spoof / layer
            detection.
        orderOriginalQty:
          type: string
          description: >-
            Order original quantity (decimal string, in outcome-token units).
            Compare with `quantity` on the trade row to know whether this fill
            fully consumed the order or was a partial cross.
        orderRemainingQty:
          type: string
          description: >-
            Order remaining quantity AS OF THIS TRADE (decimal string). For an
            order that ate two trades sequentially, the partner sees this field
            shrinking across trade rows ordered by `matchedAt`.
      required:
        - side
        - walletAddress
        - vaultAddress
        - orderId
        - orderType
        - orderTimeInForce
        - orderPlacedAt
        - orderOriginalQty
        - orderRemainingQty
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Partner / integrator key — format `ps_live_<keyId>_<secret>`. Partner
        keys are issued by PredictStreet; a user can also create keys bound to
        their own wallet from their account settings in the web app. Never ship
        to a browser. `multi_wallet` partners must additionally send
        `X-User-Wallet: 0x<40-hex>` on every authenticated request to declare
        the acting wallet. See the [API keys guide](/auth/api-keys) for scope
        taxonomy, partner kinds, rate limits, and rotation procedure.

````

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