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

# Retrieve Metric

> Retrieves a metric as a time series of points for an account over a date range.



## OpenAPI

````yaml /openapi/api-v1-native.yml get /stats/{metric}
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    Hand-written V1 endpoints. Merged into the GraphqlRestProxy-generated schema
    at build time.
  version: v1
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.whop.com/api/v1
security: []
paths:
  /stats/{metric}:
    parameters:
      - name: metric
        in: path
        required: true
        schema:
          type: string
        description: >-
          The metric to retrieve, for example net_revenue. Use GET /stats to see
          every metric key. The metric sets the unit and the properties you can
          filter or break down by.
      - $ref: '#/components/parameters/ApiVersionDate'
    get:
      tags:
        - Stats
      summary: Retrieve Metric
      description: >-
        Retrieves a metric as a time series of points for an account over a date
        range.
      operationId: retrieveMetric
      parameters:
        - name: account_id
          in: query
          required: true
          schema:
            type: string
          description: The account to measure, for example biz_AbC123.
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date
          description: Start of the date range (YYYY-MM-DD).
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date
          description: End of the date range (YYYY-MM-DD).
        - name: interval
          in: query
          required: false
          schema:
            type: string
            enum:
              - hour
              - day
              - week
              - month
          description: >-
            How wide each point is. Defaults to day. Snapshot metrics are
            day-only.
        - name: breakdown_by
          in: query
          required: false
          schema:
            type: string
          description: >-
            Split the metric out by one of its properties — each point gets a
            breakdown array. For example breakdown_by=currency returns an entry
            for usd, an entry for eur, and so on.
        - name: convert_to
          in: query
          required: false
          schema:
            type: string
          description: >-
            Display currency for money metrics — every amount is converted into
            this ISO currency using the exchange rate on each period's date.
            Defaults to usd. Ignored when you filter or break down by currency
            (those report the original transaction currency, unconverted).
        - name: currency
          in: query
          required: false
          schema:
            type: string
          description: >-
            Filter to transactions made in this original ISO currency, for
            example eur — reported in that currency, not converted. Pair with
            breakdown_by=currency to split a metric by currency. Available on
            metrics that list currency.
        - name: time_zone
          in: query
          required: false
          schema:
            type: string
          description: >-
            IANA time zone to bucket the series in, for example
            America/New_York. Defaults to UTC. Not accepted by snapshot metrics,
            which are UTC only.
        - name: payment_method
          in: query
          required: false
          schema:
            type: string
          description: >-
            Filter to a single payment method, for example card or crypto.
            Available on metrics that list payment_method.
        - name: card_network
          in: query
          required: false
          schema:
            type: string
          description: >-
            Filter to a single card brand, for example visa. A refinement of
            payment_method=card. Available on metrics that list card_network.
        - name: snapshot_window
          in: query
          required: false
          schema:
            type: string
            enum:
              - 30d
          description: >-
            Trailing window for snapshot metrics. Only accepted by snapshot
            metrics (each lists its allowed windows in the catalog); defaults to
            the metric's first supported window. Only 30d today.
      responses:
        '200':
          description: split into one segment per property value
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      points:
                        type: array
                        description: One entry per period, oldest first.
                        items:
                          type: object
                          properties:
                            timestamp:
                              type: integer
                              description: Unix timestamp (seconds) of the period start.
                            value:
                              type: number
                              nullable: true
                              description: >-
                                The metric's value for this period, in the
                                metric's unit.
                            breakdown:
                              type: array
                              description: >-
                                Present only when broken down: one entry per
                                property value in this period.
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: >-
                                      The property value, for example usd or
                                      visa.
                                  value:
                                    type: number
                                    nullable: true
                                    description: The metric's value for this entry.
                                required:
                                  - name
                                  - value
                          required:
                            - timestamp
                            - value
                    required:
                      - points
                required:
                  - data
        '400':
          $ref: '#/components/responses/InvalidParameters'
          description: subject tag type mismatch
        '404':
          $ref: '#/components/responses/NotFound'
          description: unknown account
      security:
        - bearerAuth:
            - stats:read
components:
  parameters:
    ApiVersionDate:
      name: Api-Version-Date
      in: header
      required: false
      schema:
        type: string
        format: date
        example: '2026-06-20'
      description: >-
        Pins the request to a dated API version. When omitted, the request uses
        the original (2025-01-01) request/response shapes, so existing
        unversioned callers are never broken. Generated SDKs always send the
        latest version they were built against. An unrecognized value is
        rejected with a 400. The schemas documented here always describe the
        latest version.
  responses:
    InvalidParameters:
      description: Invalid Parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
  schemas:
    V1ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Human-readable error message.
          required:
            - type
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        An account API key, account scoped JWT, app API key, or user OAuth
        token.

````