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

# Per-MM KPI-bucket feed (keyset-paginated)

> Buckets are idempotent by (marketMakerId, marketId, bucketStart) — upsert on your side; re-pulling any range after a recompute is safe; engineVersion/computedAt disclose recomputation. 10-minute UTC-aligned grain.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/partner/mm-kpis
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/mm-kpis:
    get:
      tags:
        - partner
      summary: Per-MM KPI-bucket feed (keyset-paginated)
      description: >-
        Buckets are idempotent by (marketMakerId, marketId, bucketStart) —
        upsert on your side; re-pulling any range after a recompute is safe;
        engineVersion/computedAt disclose recomputation. 10-minute UTC-aligned
        grain.
      operationId: PartnerMmKpisController_list
      parameters:
        - name: from
          required: true
          in: query
          description: >-
            ISO-8601 lower bound (inclusive) on bucketStart. Keep constant
            across a cursor walk.
          schema:
            example: '2026-06-11T00:00:00Z'
            type: string
        - name: to
          required: false
          in: query
          description: ISO-8601 upper bound (exclusive) on bucketStart.
          schema:
            type: string
        - name: marketMakerId
          required: false
          in: query
          description: Filter to one market maker id (see /market-makers).
          schema:
            type: string
        - name: marketSymbol
          required: false
          in: query
          description: Filter to one market symbol.
          schema:
            type: string
        - name: cursor
          required: false
          in: query
          description: Opaque cursor from the previous page. Pass back unchanged.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Page size. Values above 1000 are rejected with 400.
          schema:
            minimum: 1
            maximum: 1000
            default: 500
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerMmKpisRespDto'
      security:
        - ApiKey:
            - partner:mm-kpis:read
components:
  schemas:
    PartnerMmKpisRespDto:
      type: object
      properties:
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/PartnerMmKpiBucketDto'
        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.
      required:
        - buckets
        - nextCursor
    PartnerMmKpiBucketDto:
      type: object
      properties:
        marketMakerId:
          type: string
          description: Market maker id (see /market-makers).
        marketId:
          type: string
          description: Market id.
        marketSymbol:
          type: string
          description: Market symbol.
        bucketStart:
          type: string
          description: ISO-8601 bucket start, UTC, 10-minute aligned.
        twoSidedPresencePct:
          type: string
          description: Two-sided-presence percentage in the bucket (decimal string).
        spreadBpsAvg:
          type: string
          nullable: true
          description: >-
            Average quoted spread (bps). NULL when the MM was never two-sided in
            this bucket.
        spreadBpsMin:
          type: string
          nullable: true
          description: >-
            Worst outcome’s minimum quoted spread (bps): the scalar row reports
            the outcome whose tightest spread was widest, so a good outcome
            cannot mask a bad one. Per-outcome minimums are in `outcomes`.
        spreadBpsMax:
          type: string
          nullable: true
          description: Maximum quoted spread (bps).
        depthUsdBidAvg:
          type: string
          description: >-
            Average bid-side depth in USD. "0" (never null) when the MM had no
            resting orders.
        depthUsdAskAvg:
          type: string
          description: Average ask-side depth in USD.
        depthUsdMin:
          type: string
          description: Minimum observed depth (either side) in USD.
        depthBandedBidAvg:
          type: string
          nullable: true
          description: >-
            Average bid-side depth within the configured band. NULL when no band
            is configured or no market mid was available.
        depthBandedAskAvg:
          type: string
          nullable: true
          description: Average ask-side banded depth.
        quoteAgeSecAvg:
          type: string
          nullable: true
          description: Average quote age (seconds). NULL when nothing rested in the bucket.
        quoteAgeSecMax:
          type: string
          nullable: true
          description: Maximum quote age (seconds).
        placements:
          type: string
          description: Order placements in the bucket.
        cancels:
          type: string
          description: Order cancels in the bucket.
        orderChanges:
          type: string
          description: placements + cancels.
        makerFills:
          type: string
          description: Fills where this MM was the maker.
        makerNotionalUsd:
          type: string
          description: Maker-side notional (USD, decimal string).
        takerFills:
          type: string
          description: Fills where this MM was the taker.
        takerNotionalUsd:
          type: string
          description: Taker-side notional (USD, decimal string).
        marketBestBid:
          type: string
          nullable: true
          description: >-
            Time-weighted average market best bid over the bucket (engine
            timeWeightedTicks).
        marketBestAsk:
          type: string
          nullable: true
          description: >-
            Time-weighted average market best ask over the bucket (engine
            timeWeightedTicks).
        marketMid:
          type: string
          nullable: true
          description: >-
            Time-weighted average market mid over the bucket (engine
            timeWeightedTicks).
        outcomes:
          description: >-
            Per-outcome KPI breakdown (binary markets emit a single-element
            array).
          type: array
          items:
            type: object
        meta:
          type: object
          description: Free-form diagnostic metadata (e.g. cancel-reason class breakdown).
        engineVersion:
          type: number
          description: >-
            Reconstruction engine version that produced this row. Bumps
            (together with computedAt) disclose a recompute — see controller
            doc.
        computedAt:
          type: string
          description: ISO-8601 timestamp this row was last (re)computed.
      required:
        - marketMakerId
        - marketId
        - marketSymbol
        - bucketStart
        - twoSidedPresencePct
        - spreadBpsAvg
        - spreadBpsMin
        - spreadBpsMax
        - depthUsdBidAvg
        - depthUsdAskAvg
        - depthUsdMin
        - depthBandedBidAvg
        - depthBandedAskAvg
        - quoteAgeSecAvg
        - quoteAgeSecMax
        - placements
        - cancels
        - orderChanges
        - makerFills
        - makerNotionalUsd
        - takerFills
        - takerNotionalUsd
        - marketBestBid
        - marketBestAsk
        - marketMid
        - outcomes
        - meta
        - engineVersion
        - computedAt
  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.