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

# List close-all runs

> Every close-all run of your organization, newest first, with its progress counters. Use `GET /organization/flatten-runs/{runId}` for the affected accounts and failures of one run.

Requires **view** permission on traders.

```bash
curl "https://api.hyperprop.com/platform/v1/organization/flatten-runs?limit=20" \
  -H "X-API-Key: hp_live_your_key_here"
```



## OpenAPI

````yaml https://api.hyperprop.com/platform/openapi.json get /v1/organization/flatten-runs
openapi: 3.0.0
info:
  title: Hyperprop Platform API
  version: 1.0.0
  description: >-
    REST API for the Hyperprop Trading Platform — provision evaluation and
    funded trading accounts, manage traders and plans, react to account
    lifecycle events via signed webhooks, and reconcile billing. Built for prop
    firms integrating from their own backend.


    Authentication, quick start, error handling, idempotency, pagination, custom
    metadata, webhooks, and the MCP connector are documented at
    https://docs.hyperprop.com.
  x-logo:
    url: https://app.hyperprop.com/logo-icon.svg
    altText: Hyperprop
    href: https://hyperprop.com
servers:
  - url: https://api.hyperprop.com/platform
    description: Production
security: []
tags:
  - name: Trading accounts
    description: Create, update, and inspect trading accounts.
  - name: Traders
    description: Look up and update the traders in your organization.
  - name: Trading plans
    description: Define the plans you sell.
  - name: Trading rules
    description: Define how accounts are evaluated.
  - name: Lockouts
    description: Pause and resume trading on an account.
  - name: Payouts
    description: Check payout eligibility and record payouts.
  - name: Purchases
    description: Purchases recorded for your organization.
  - name: Time Machine
    description: Restore accounts to an earlier trading day or instant.
  - name: Webhooks
    description: Register webhook endpoints and inspect deliveries.
  - name: Events
    description: Your organization's event history and real-time event stream.
  - name: Reconciliation
    description: Balances, end-of-day snapshots, and fills for reconciliation.
  - name: Analytics
    description: Organization performance and plan economics.
  - name: Billing
    description: 'Your Hyperprop bill: activity, billing cycles, and forecasts.'
  - name: Team and roles
    description: Manage dashboard access for your staff.
  - name: API keys
    description: Manage your organization's API key.
  - name: Logs and health
    description: API request logs, the audit log, and integration health.
  - name: Organization profile
    description: Your organization's profile and logo.
  - name: Support
    description: Open and follow up on support tickets.
  - name: Partner access
    description: >-
      Read a trader's journal as an approved partner app, with the trader's own
      key.
paths:
  /v1/organization/flatten-runs:
    get:
      tags:
        - Trading accounts
      summary: List close-all runs
      description: >-
        Every close-all run of your organization, newest first, with its
        progress counters. Use `GET /organization/flatten-runs/{runId}` for the
        affected accounts and failures of one run.


        Requires **view** permission on traders.


        ```bash

        curl
        "https://api.hyperprop.com/platform/v1/organization/flatten-runs?limit=20"
        \
          -H "X-API-Key: hp_live_your_key_here"
        ```
      operationId: getV1OrganizationFlattenruns
      parameters:
        - description: Results per page
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - description: Pagination offset
          name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: Runs retrieved
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model98'
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model11'
        '403':
          description: Forbidden - The caller lacks traders:view
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model99'
        '500':
          description: An unexpected error occurred
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model6'
        '504':
          description: >-
            Gateway Timeout - The request did not complete within 25 seconds
            (`REQUEST_TIMEOUT`). Nothing was changed; retry, or narrow the
            request (for example a shorter date range).
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model100'
      security:
        - X-API-Key: []
components:
  schemas:
    Model98:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Model97'
    Model11:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication required
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: UNAUTHORIZED
    Model99:
      type: object
      properties:
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: Your role does not have write access to "Traders & accounts"
        code:
          type: string
          example: INSUFFICIENT_PERMISSIONS
    Model6:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: Internal Server Error
        message:
          type: string
          example: An unexpected error occurred
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: INTERNAL_ERROR
    Model100:
      type: object
      properties:
        statusCode:
          type: number
          example: 504
        error:
          type: string
          example: Gateway Timeout
        message:
          type: string
          example: >-
            The request did not complete within 25 seconds. Try again, or narrow
            it (for example a shorter date range).
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: REQUEST_TIMEOUT
    Model97:
      type: object
      properties:
        runs:
          $ref: '#/components/schemas/runs'
        pagination:
          $ref: '#/components/schemas/Model96'
    runs:
      type: array
      items:
        $ref: '#/components/schemas/Model95'
    Model96:
      type: object
      properties:
        total:
          type: integer
          example: 1
        limit:
          type: integer
          example: 20
        offset:
          type: integer
          example: 0
        hasMore:
          type: boolean
          example: false
    Model95:
      type: object
      properties:
        runId:
          type: string
          example: 3f2a9c1e-8b7d-4e6f-a5c4-1d2e3f4a5b6c
          x-format:
            guid: true
        scope:
          $ref: '#/components/schemas/scope'
        status:
          $ref: '#/components/schemas/Model94'
        reason:
          type: string
          example: Market data outage
        requestedBy:
          type: string
          description: Staff email, or `api-key`
          example: ops@yourfirm.com
        total:
          type: integer
          description: Accounts the run covers
          example: 7180
        processed:
          type: integer
          description: Accounts handled so far
          example: 7180
        accountsFlattened:
          type: integer
          description: Accounts where at least one position was closed or order cancelled
          example: 412
        positionsClosed:
          type: integer
          example: 530
        ordersCancelled:
          type: integer
          example: 244
        failed:
          type: integer
          description: Accounts that could not be confirmed; see `failures` on the run
          example: 0
        createdAt:
          type: string
          example: '2026-10-17T14:02:11.000Z'
        lastProgressAt:
          type: string
          description: When the run last reported progress
          example: '2026-10-17T14:04:52.000Z'
        completedAt:
          type: string
          example: '2026-10-17T14:04:52.000Z'
    scope:
      type: string
      description: >-
        `all`: every tradable account of the organization. `accounts`: the
        accounts you listed.
      example: all
      enum:
        - all
        - accounts
    Model94:
      type: string
      description: >-
        `interrupted`: the run stopped making progress before it finished (for
        example during a service restart). Start a new run to cover the rest;
        accounts already flat are left alone.
      example: completed
      enum:
        - running
        - completed
        - interrupted
  securitySchemes:
    X-API-Key:
      type: apiKey
      name: X-API-Key
      in: header
      description: >-
        Organization API key. Format: "hp_live_{key}". Organization admins
        manage the key in the dashboard.

````

## Related topics

- [Get a close-all run](/platform-api/trading-accounts/get-a-close-all-run.md)
- [Close all positions across accounts](/platform-api/trading-accounts/close-all-positions-across-accounts.md)
- [Close all positions on an account](/platform-api/trading-accounts/close-all-positions-on-an-account.md)
- [Close all open positions for an account](/trade-api/positions/close-all-open-positions-for-an-account.md)
- [Rate limits & quotas](/concepts/rate-limits.md)


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