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

# List All Orders Stats

> Aggregate stats over all open orders matching the same filters as
GET /orders/all. Independent of pagination — counts and sums reflect
the entire filtered set even at 100k+ rows.

Powers the CRM Orders page KPI tiles, which previously computed from
the loaded 200-row page and were wrong at scale. PnL is read from
the snapshot column (open_orders.profit) which the PnL engine flushes
every 60s; freshness is acceptable for KPI display.

Long/short exposure is in USD via open_orders.exposure_usd
(populated by execute_order SP at fill time, frozen).



## OpenAPI

````yaml /openapi.json get /orders/all/stats
openapi: 3.1.0
info:
  title: Slate API
  version: 1.0.0
  description: Trading infrastructure API.
servers:
  - url: https://api.{your-broker}.slate-labs.com
    variables:
      your-broker:
        default: broker
security: []
tags:
  - name: Authentication
  - name: API Tokens
  - name: Customers
  - name: Accounts
  - name: Orders
  - name: Instruments & Groups
  - name: Transactions
  - name: Payments
  - name: Transfers
  - name: Risk
  - name: Workflow & CRM
  - name: Messaging
  - name: Integrations
  - name: Webhooks
  - name: Compliance
  - name: Promo codes
  - name: Reporting
  - name: Audit
  - name: Fraud & moderation
  - name: Broker settings
  - name: Users
  - name: Roles & Teams
  - name: Streams (SSE)
  - name: Simulator
  - name: Observability
  - name: Prop trading
paths:
  /orders/all/stats:
    get:
      tags:
        - Orders
      summary: List All Orders Stats
      description: |-
        Aggregate stats over all open orders matching the same filters as
        GET /orders/all. Independent of pagination — counts and sums reflect
        the entire filtered set even at 100k+ rows.

        Powers the CRM Orders page KPI tiles, which previously computed from
        the loaded 200-row page and were wrong at scale. PnL is read from
        the snapshot column (open_orders.profit) which the PnL engine flushes
        every 60s; freshness is acceptable for KPI display.

        Long/short exposure is in USD via open_orders.exposure_usd
        (populated by execute_order SP at fill time, frozen).
      operationId: list_all_orders_stats_orders_all_stats_get
      parameters:
        - name: symbol
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Filter by symbol
            title: Symbol
          description: Filter by symbol
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Free-text search on login or symbol
            title: Search
          description: Free-text search on login or symbol
        - name: cmd
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: 'Filter by side: 0=buy, 1=sell'
            title: Cmd
          description: 'Filter by side: 0=buy, 1=sell'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````