> ## 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 maintenance windows

> Upcoming and active maintenance windows, plus any that finished after `from`. This is the SCHEDULE — use it to stop trading before an outage rather than during it; `GET /api/platform/status` answers "is it down right now".

Requires a **partner** API key in `X-Api-Key`, one issued when you were onboarded. No scope is needed, and no `X-User-Wallet` header. A self-service key minted from a retail account is refused with `403 partner_key_required`, and a signed-in user session (`Authorization: Bearer`) with `403 api_key_required_not_jwt`. Where the feature is not switched on, the endpoint answers `404 not_found`.

**Poll incrementally by passing `generatedAt` back as `from`** — not the `from` you sent, and not your own clock. `generatedAt` sits about a minute behind the moment the data was read, so a completion or cancellation that was mid-commit when we read still reaches you on the next poll; you will therefore see windows you already have for up to a minute after they change, so upsert by `id`.

Three behaviours worth coding against: a running window stays listed after `expectedEndAt` passes (overrunning is when you most need it — drive logic off `status`, never off the clock); a window announced but never started stays listed as `scheduled` until its `expectedEndAt` passes and then disappears, so treat a `scheduled` window missing from a response as gone; and a window that has started is never cancelled — after `in_progress` the only status that follows is `completed`.

Rate limit: 600 requests per minute per partner (all of your keys share it; it scales with your rate tier) plus 600 per minute per IP. These are its own buckets, separate from the one the other `/api/platform/*` routes share. `Cache-Control: private, max-age=5`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/platform/maintenance
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/platform/maintenance:
    get:
      tags:
        - Platform
      summary: List maintenance windows
      description: >-
        Upcoming and active maintenance windows, plus any that finished after
        `from`. This is the SCHEDULE — use it to stop trading before an outage
        rather than during it; `GET /api/platform/status` answers "is it down
        right now".


        Requires a **partner** API key in `X-Api-Key`, one issued when you were
        onboarded. No scope is needed, and no `X-User-Wallet` header. A
        self-service key minted from a retail account is refused with `403
        partner_key_required`, and a signed-in user session (`Authorization:
        Bearer`) with `403 api_key_required_not_jwt`. Where the feature is not
        switched on, the endpoint answers `404 not_found`.


        **Poll incrementally by passing `generatedAt` back as `from`** — not the
        `from` you sent, and not your own clock. `generatedAt` sits about a
        minute behind the moment the data was read, so a completion or
        cancellation that was mid-commit when we read still reaches you on the
        next poll; you will therefore see windows you already have for up to a
        minute after they change, so upsert by `id`.


        Three behaviours worth coding against: a running window stays listed
        after `expectedEndAt` passes (overrunning is when you most need it —
        drive logic off `status`, never off the clock); a window announced but
        never started stays listed as `scheduled` until its `expectedEndAt`
        passes and then disappears, so treat a `scheduled` window missing from a
        response as gone; and a window that has started is never cancelled —
        after `in_progress` the only status that follows is `completed`.


        Rate limit: 600 requests per minute per partner (all of your keys share
        it; it scales with your rate tier) plus 600 per minute per IP. These are
        its own buckets, separate from the one the other `/api/platform/*`
        routes share. `Cache-Control: private, max-age=5`.
      operationId: PlatformMaintenanceController_maintenance
      parameters:
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Return windows still relevant at this instant: everything live, plus
            anything that finished after it. Defaults to now, which gives
            upcoming + active. Must be a form with separators —
            `2026-10-11T02:00:00Z`, not `20261011`. Prefer `Z`; if you send an
            offset, URL-encode the `+` (`%2B`).
        - name: scope
          in: query
          required: false
          schema:
            type: string
            enum:
              - trading
              - withdrawals
              - all
          description: >-
            Asking for `trading` or `withdrawals` ALSO returns `all` windows,
            because an `all` window takes that surface down too. Asking for
            `all` returns full-platform windows only. Omit for every surface.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceListDto'
        '400':
          description: >-
            `invalid_request`: `from` is not an ISO-8601 instant with
            separators, `scope` is not `trading`, `withdrawals` or `all`, or an
            unknown query parameter was sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            `auth_required`: no credentials. `api_key_*`: the key is malformed,
            unknown, revoked, expired, or called from outside its IP allowlist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `partner_key_required`: authenticated with a self-service key minted
            from a retail account, not an onboarded partner key.
            `api_key_required_not_jwt`: authenticated with a user session
            (`Authorization: Bearer`) instead of `X-Api-Key`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            `not_found`: the maintenance feature is switched off in this
            environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - ApiKey: []
components:
  schemas:
    MaintenanceListDto:
      type: object
      properties:
        windows:
          type: array
          items:
            $ref: '#/components/schemas/MaintenanceWindowDto'
          description: Oldest start first.
        from:
          type: string
          format: date-time
          description: >-
            The filter applied to THIS request, echoed for debugging. Do not use
            it as your cursor — use `generatedAt`.
        generatedAt:
          type: string
          format: date-time
          description: >-
            **Your cursor for the next request**: pass it back as `from`. About
            a minute behind the moment the data was read, so a completion or
            cancellation that was mid-commit at the read still reaches you next
            time. The overlap means you will be shown windows you already have
            for up to a minute after they change — upsert by `id`.
      required:
        - windows
        - from
        - generatedAt
    Error:
      type: object
      description: >-
        Error body returned by every API error (same shape as `ErrorEnvelope`).
        Branch on `error.code`, not on `message`.
      required:
        - status
        - error
      properties:
        status:
          type: integer
          description: HTTP status, repeated in the body.
          example: 404
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                Machine-readable code (e.g. `market_not_found`,
                `event_not_found`, `invalid_limit`).
            message:
              type: string
            trace_id:
              type: string
              description: Request trace id; quote it to support. May be absent.
            retryAfterSec:
              type: integer
              description: >-
                Seconds to wait before retrying, when the server says so (also
                sent as the `Retry-After` header).
            retryable:
              type: boolean
              description: >-
                Whether the same request may be sent again as it is. Absent when
                the server does not say.
            details:
              type: object
              additionalProperties: true
              description: >-
                Extra structured context thrown with the error, e.g. `slug`,
                `allowed`, `auditId`.
    MaintenanceWindowDto:
      type: object
      properties:
        id:
          type: string
          description: Stable for the life of the window. Upsert by it.
        scope:
          type: string
          enum:
            - trading
            - withdrawals
            - all
          description: '`all` covers both surfaces.'
        status:
          type: string
          enum:
            - scheduled
            - in_progress
            - completed
            - cancelled
          description: >-
            `scheduled`: announced, not started. `in_progress`: running.
            `completed`: finished. `cancelled`: called off before it started. A
            window that has started is never cancelled; it completes.
        title:
          type: string
          description: Partner-facing, English.
        message:
          type: string
          description: What stops working, in our own words.
        startsAt:
          type: string
          format: date-time
        expectedEndAt:
          type: string
          format: date-time
          description: >-
            MOVES while a window runs long. Re-read it; do not cache the first
            value.
        startedAt:
          type: string
          format: date-time
          nullable: true
          description: When it actually started. Null until it does.
        endedAt:
          type: string
          format: date-time
          nullable: true
          description: When it actually ended, or was cancelled. Null while open.
      required:
        - id
        - scope
        - status
        - title
        - message
        - startsAt
        - expectedEndAt
        - startedAt
        - endedAt
  responses:
    RateLimited:
      description: >-
        Rate limit exceeded. `Retry-After` and `X-RateLimit-Reset` headers are
        set.
      headers:
        Retry-After:
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
        X-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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.