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

# Finish a sandbox self-check

> Closes and grades the run. Every rule must be exercised and pass. Wait at least ten seconds after a risk lock before closing; a client that stopped correctly need not resend it. An unanswered rate limit or dropped stream fails. Null-money display is a separate attestation, not measured by this run.



## OpenAPI

````yaml /partner-platform/openapi.json post /api/partner/conformance/runs/{id}/close
openapi: 3.1.0
info:
  title: trdrs Engine API
  version: 1.1.0
  description: >-
    ## API Reference


    This is the served OpenAPI contract for the trdrs engine: market data,
    trading and account

    routes for your firm's traders, trdrs Connect account-registration handoff,
    and preview

    challenge routes.


    See Quick Start for the first integration path: key setup, market config,
    chart data, Connect

    account registrations, idempotency, stream reconnects, and conformance.


    See Overview and API Standards for the cross-cutting contract rules.
servers:
  - url: https://app.trdrs.co
    description: Production
  - url: /
    description: This engine
security: []
tags:
  - name: Venue platform preview
    description: >-
      The venue routes, in preview: a venue’s providers, instruments,
      conditions, groups, routes, stages, level 2, keys, accounts, usage,
      balance receipts and webhooks. Served on the sandbox to every venue;
      production availability is arranged when a venue qualifies. Every route
      documented here under /api/partner/ takes a Venue key and is also served
      under /api/operator/ to a verified owner session, by the same router with
      a different credential: a browser never holds a Venue key, so the back
      office reaches the identical checks that way. Additive-only from here; the
      Legacy Partner API routes remain unchanged.
  - name: Market data
    description: >-
      Symbol search and resolution, OHLCV history, quote snapshots, the server
      clock, and the live bar stream. Crypto rides each provider’s public feed;
      futures stream from the caller’s own connected Rithmic account. With none
      connected, futures requests answer 503 `feed_requires_connection`.
  - name: News
    description: >-
      Aggregated market news and the economic calendar, from licensed/open
      sources, keyword-tagged with futures roots at ingest. Platform-wide
      content (nothing per-user), admitted exactly like Market data: a licensed
      origin, a session, or a Trading API key. Headlines page by published time,
      scope by instrument root, and stream live over SSE; thumbnails serve
      through the image proxy.
  - name: Trading
    description: >-
      The money routes: entries, exits, replaces, cancels, and position/account
      flattening. Every order-placing call uses `clientOrderId` as its
      idempotency key.
  - name: Account
    description: >-
      Reading a connected account. You do not create trading accounts here: a
      trader connects their own account at a provider (or opens their own Demo
      on the paper book) in the app, and a venue issues accounts on the paper
      book (Venue platform → Issue an account into a group; the Legacy Partner
      API’s Create evaluation accounts does the same) or pre-registers accounts
      at a provider through Connect (Pre-register a trader’s account). Account
      state and the durable ledgers: balances, positions, working orders, fills,
      P&L history, and the live account stream.
  - name: Connect
    description: >-
      Connect is the account picker a trader opens, in our app or embedded on a
      firm’s site: the built-in providers, plus every listed venue. These three
      routes are how a firm PRE-FILLS it. You tell us a trader has an account at
      a built-in provider (their sign-in email, and optionally the account
      number and login name); when that trader signs in, Connect shows the
      account ready to link and they sign in to the provider themselves, once.
      Nothing here sends a password or grants access before the trader’s own
      login succeeds. You can list who you pre-registered and who has linked,
      and cancel a pre-registration that has not been used. Pre-registrations
      expire after 30 days; repeating one refreshes it. These routes take the
      Partner key and are Connect’s own; they are not part of the Legacy Partner
      API. The end-to-end flow is **[Quick Start](/docs/guides/quick-start)**.
  - name: Firm accounts (legacy)
    description: >-
      Legacy Partner API. Every route in this group has a venue twin under
      `/api/partner/venues/{venueId}/accounts…`, reached with a Venue key and a
      named scope, and new integrations use those; this group stays for firms
      that predate venues, and the same operation runs behind both. Evaluation
      accounts your firm issues on the paper book, through your Partner key.
      Connect pre-registers accounts that exist at a provider; these routes
      create and manage accounts on the paper book: the trader trades them on
      trdrs, and your firm owns the lifecycle. Every route is scoped to accounts
      your firm created through this API — an account the same trader opened
      themselves is invisible and untouchable here, by construction. Creation is
      batched with per-item results, and every write carries your own
      `referenceId`, so a crashed pipeline retries safely. Served when the
      deployment runs the prop engine; without it, every route in this group
      answers `404`.
  - name: Billing
    description: >-
      Legacy Partner API, per firm. What your firm is billed for in a month,
      computed from the execution ledger, and the accounts behind the number.
      The venue platform will carry per-venue usage; until it does these two
      routes answer the Partner key.
  - name: Webhooks
    description: >-
      Legacy Partner API, being replaced by venue-scoped events, which are not
      built yet; this is the one job a venue-only backend still needs a Partner
      key for, and nothing here is removed until they are. The outbound event
      bus: register an https endpoint and the platform pushes events to it
      instead of your back office polling us. Every delivery is signed
      (`trdrs-signature: t=<unix>,v1=<hmac-sha256>` over `${t}.${rawBody}`) so
      you can prove it came from us and is fresh, and every delivery is durable
      — a failed attempt is retried with backoff for about nine hours and the
      whole log is readable, so an endpoint that was down is a delay rather than
      a lost event. Serves every venue alike: the account-registration
      (`registration.*`) events fire wherever Connect does, and the account
      events fire where the prop engine runs.
  - name: Challenges
    description: >-
      Legacy Partner API, being replaced by stage rules on the venue, which
      carry the firm’s half of this; the trader’s enroll flow has not moved yet.
      The prop evaluation routes: challenge programs and a trader’s own
      enrollments. **Preview: the one group on this page outside the
      additive-only guarantee** (the pre-contract v1 scaffold; the Phase-1
      rebuild will change these shapes; see Stability). **Cookie-authenticated,
      not key-authenticated**, and served only when the engine runs with
      `CHALLENGES_ENABLED`; without that flag the bundle is absent and every
      route below returns `404`. The admin half of this is deliberately not
      documented here. It is platform administration, not licensed API.
paths:
  /api/partner/conformance/runs/{id}/close:
    post:
      tags:
        - Connect
      summary: Finish a sandbox self-check
      description: >-
        Closes and grades the run. Every rule must be exercised and pass. Wait
        at least ten seconds after a risk lock before closing; a client that
        stopped correctly need not resend it. An unanswered rate limit or
        dropped stream fails. Null-money display is a separate attestation, not
        measured by this run.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Run and measured results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConformanceResponse'
        '401':
          description: A valid partner sandbox key is required
        '404':
          description: Run does not exist or belongs to another firm
        '409':
          description: Non-sandbox deployment, overlapping run, or already closed run
      security:
        - partnerKey: []
      servers:
        - url: https://sandbox.trdrs.co
          description: Sandbox only
      x-codeSamples:
        - lang: javascript
          label: TypeScript
          source: >-
            const res = await
            fetch('https://sandbox.trdrs.co/api/partner/conformance/runs/{id}/close',
            {
              method: 'POST',
              headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
            })

            const data = await res.json()
        - lang: shell
          label: cURL
          source: >-
            curl -X POST
            'https://sandbox.trdrs.co/api/partner/conformance/runs/{id}/close' \
              -H "Authorization: Bearer $TRDRS_API_KEY"
components:
  schemas:
    ConformanceResponse:
      type: object
      required:
        - run
      properties:
        run:
          $ref: '#/components/schemas/ConformanceRun'
        grade:
          $ref: '#/components/schemas/ConformanceGrade'
        rules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              kind:
                type: string
              minObservations:
                type: integer
              howToExercise:
                type: string
        attestation:
          type: string
      example:
        run:
          id: 96507d96-8c4f-4b84-a718-a72dd77ba104
          status: open
          rulesetVersion: '1.0'
          openedAt: '2026-09-11T12:00:00.000Z'
          expiresAt: '2026-09-11T14:00:00.000Z'
          closedAt: null
        grade:
          rulesetVersion: '1.0'
          passed: false
          outstanding:
            - stream_reconnect
          results:
            - rule: stream_reconnect
              title: Streams recover from a reconnect snapshot
              kind: injected
              outcome: not_exercised
              passes: 0
              failures: 0
              note: Open an account stream and reconnect after the sandbox drops it.
    ConformanceRun:
      type: object
      required:
        - id
        - status
        - rulesetVersion
        - openedAt
        - expiresAt
        - closedAt
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - open
            - passed
            - failed
            - expired
        rulesetVersion:
          type: string
        openedAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        closedAt:
          type:
            - string
            - 'null'
          format: date-time
    ConformanceGrade:
      type: object
      required:
        - rulesetVersion
        - passed
        - outstanding
        - results
      properties:
        rulesetVersion:
          type: string
        passed:
          type: boolean
        outstanding:
          type: array
          items:
            type: string
        results:
          type: array
          items:
            type: object
            required:
              - rule
              - title
              - kind
              - outcome
              - passes
              - failures
              - note
            properties:
              rule:
                type: string
              title:
                type: string
              kind:
                type: string
                enum:
                  - passive
                  - injected
              outcome:
                type: string
                enum:
                  - pass
                  - fail
                  - not_exercised
              passes:
                type: integer
              failures:
                type: integer
              note:
                type:
                  - string
                  - 'null'
  securitySchemes:
    partnerKey:
      type: http
      scheme: bearer
      description: >-
        The Partner key (`trdrs_sk_…`), issued to a firm for Connect
        pre-registration and the Legacy Partner API, accepted only under
        `/api/partner/` outside the venue routes. Same format as the Trading API
        key, different scope: a Trading API key is refused here, and this key is
        refused everywhere else. A venue’s own backend holds a Venue key
        instead.

````