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

# Get Financial Metrics Time Series Data

> [OpenAPI JSON Spec](/docs/output/v1_stocks_financial-metrics_get.json)
Retrieve time series data for 28 different types of financial metrics for stocks

**Overview**
This endpoint provides time series data for 28 financial metrics, including TTM metrics, MRQ ratios, and various growth rates. These metrics are essential for financial analysis, valuation, and investment decision-making.

**Key Use Cases**
- **Financial Analysis**: Evaluate company profitability, efficiency, and solvency
- **Investment Screening**: Filter stocks based on fundamental metrics
- **Trend Analysis**: Track how financial metrics evolve over time
- **Comparative Analysis**: Compare metrics across different companies

**Metric Types**

**TTM Base Metrics (3 metrics)**
TTM = Trailing Twelve Months (sum of current quarter + previous 3 quarters)
- REVENUE_TTM: Total revenue over the trailing twelve months (pre-calculated sum of 4 quarters)
- NET_INCOME_TTM: Net income over the trailing twelve months (pre-calculated sum of 4 quarters)
- EPS_TTM: Earnings per share over the trailing twelve months (pre-calculated sum of 4 quarters)

**TTM Profitability Ratios (3 metrics)**
- ROE_TTM: Return on equity over the trailing twelve months (uses MRQ point-in-time equity)
- ROA_TTM: Return on assets over the trailing twelve months (uses MRQ point-in-time assets)
- ROIC_TTM: Return on invested capital over the trailing twelve months (uses MRQ point-in-time invested capital components)

**MRQ Margin Ratios (3 metrics)**
MRQ = Most Recent Quarter
- GROSS_MARGIN_MRQ: Gross profit margin for the most recent quarter
- OPERATING_MARGIN_MRQ: Operating profit margin for the most recent quarter
- NET_MARGIN_MRQ: Net profit margin for the most recent quarter

**MRQ Other Ratios (2 metrics)**
- FCF_MARGIN_MRQ: Free cash flow margin for the most recent quarter
- RD_TO_SALES_TTM: R&D expense as a share of revenue over trailing twelve months

**MRQ Balance Sheet Ratios (5 metrics)**
All values use Most Recent Quarter (MRQ) balance sheet data
- DEBT_TO_EQUITY_MRQ: Most recent quarter debt-to-equity ratio
- DEBT_TO_ASSETS_MRQ: Most recent quarter debt-to-assets ratio
- CURRENT_RATIO_MRQ: Most recent quarter current ratio
- QUICK_RATIO_MRQ: Most recent quarter quick ratio (acid-test ratio)
- NET_WORKING_CAPITAL_MRQ: Net working capital at the most recent quarter (an absolute value, not a ratio)

**Revenue Growth Metrics (4 metrics)**
- REVENUE_GROWTH_QOQ: Quarter-over-quarter revenue growth rate
- REVENUE_GROWTH_YOY_QUARTERLY: Year-over-year quarterly revenue growth rate
- REVENUE_GROWTH_YOY_TTM: Year-over-year trailing twelve months revenue growth rate
- REVENUE_GROWTH_YOY_ANNUAL: Year-over-year annual revenue growth rate

**EPS Growth Metrics (4 metrics)**
- EPS_GROWTH_QOQ: Quarter-over-quarter earnings per share growth rate
- EPS_GROWTH_YOY_QUARTERLY: Year-over-year quarterly earnings per share growth rate
- EPS_GROWTH_YOY_TTM: Year-over-year trailing twelve months earnings per share growth rate
- EPS_GROWTH_YOY_ANNUAL: Year-over-year annual earnings per share growth rate

**FCF Growth Metrics (4 metrics)**
- FCF_GROWTH_QOQ: Quarter-over-quarter free cash flow growth rate
- FCF_GROWTH_YOY_QUARTERLY: Year-over-year quarterly free cash flow growth rate
- FCF_GROWTH_YOY_TTM: Year-over-year trailing twelve months free cash flow growth rate
- FCF_GROWTH_YOY_ANNUAL: Year-over-year annual free cash flow growth rate

**Response Data Structure**

Data is grouped by time (timestamp) and sorted in descending order by time. Each time group contains:
- **time**: Observation timestamp (Unix timestamp in seconds, UTC)
- **items**: Array of symbol-value pairs for this time, each containing:
- **symbol**: Stock ticker symbol (e.g., "AAPL")
- **value**: Metric value (double precision, may be negative or decimal)

**Usage Examples**

1. **Get AAPL's TTM revenue data**:
`?metric=REVENUE_TTM&symbol=AAPL&start_time=1672531200&end_time=1704067200`

2. **Get ROE data for all stocks**:
`?metric=ROE_TTM&start_time=1672531200&end_time=1704067200`

3. **Get TSLA's revenue growth rate**:
`?metric=REVENUE_GROWTH_YOY_TTM&symbol=TSLA&start_time=1672531200&end_time=1704067200`

**Important Notes**

- Required parameters: metric, start_time, end_time
- Optional parameter: symbol (if omitted, returns data for all stocks)
- All timestamps are Unix timestamps in seconds (UTC)
- Metric values are double precision floating-point numbers
- Results are grouped by time and sorted in descending order by time (newest first)
- TTM metrics: sum of current quarter + previous 3 quarters (pre-calculated)
- MRQ metrics: most recent quarterly or period-end values
- Ratio metrics: expressed as decimals (e.g., 0.25 means 25% or ratio of 0.25:1)
- Growth rates: expressed as decimals (NOT percentages). Example: 0.155 means 15.5% growth; -0.102 means 10.2% decline
- ROE/ROA denominators use MRQ point-in-time values (not period averages)
- Absolute values: NET_WORKING_CAPITAL_MRQ returns actual dollar amount, not a ratio



## OpenAPI

````yaml /api-reference/openapi.json get /v1/stocks/financial-metrics
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Welcome to Arrays!


    Arrays is a unified financial data layer for both financial institutions and
    retail users, delivering comprehensive market data across crypto and equity
    markets. Our datasets cover fundamentals, ETFs, options, crypto, and more.


    Visit [arrays.org](https://arrays.org) to request an API key and start your
    free trial. You can explore our full API offerings in the documentation
    below.


    For any questions regarding APIs or pricing, please contact
    support@arrays.org.
  title: Arrays API
  version: '1.0'
servers:
  - url: https://data-tools.prd.arrays.org/api
security: []
paths:
  /v1/stocks/financial-metrics:
    get:
      tags:
        - Stock
      summary: Get Financial Metrics Time Series Data
      description: >-
        [OpenAPI JSON Spec](/docs/output/v1_stocks_financial-metrics_get.json)

        Retrieve time series data for 28 different types of financial metrics
        for stocks


        **Overview**

        This endpoint provides time series data for 28 financial metrics,
        including TTM metrics, MRQ ratios, and various growth rates. These
        metrics are essential for financial analysis, valuation, and investment
        decision-making.


        **Key Use Cases**

        - **Financial Analysis**: Evaluate company profitability, efficiency,
        and solvency

        - **Investment Screening**: Filter stocks based on fundamental metrics

        - **Trend Analysis**: Track how financial metrics evolve over time

        - **Comparative Analysis**: Compare metrics across different companies


        **Metric Types**


        **TTM Base Metrics (3 metrics)**

        TTM = Trailing Twelve Months (sum of current quarter + previous 3
        quarters)

        - REVENUE_TTM: Total revenue over the trailing twelve months
        (pre-calculated sum of 4 quarters)

        - NET_INCOME_TTM: Net income over the trailing twelve months
        (pre-calculated sum of 4 quarters)

        - EPS_TTM: Earnings per share over the trailing twelve months
        (pre-calculated sum of 4 quarters)


        **TTM Profitability Ratios (3 metrics)**

        - ROE_TTM: Return on equity over the trailing twelve months (uses MRQ
        point-in-time equity)

        - ROA_TTM: Return on assets over the trailing twelve months (uses MRQ
        point-in-time assets)

        - ROIC_TTM: Return on invested capital over the trailing twelve months
        (uses MRQ point-in-time invested capital components)


        **MRQ Margin Ratios (3 metrics)**

        MRQ = Most Recent Quarter

        - GROSS_MARGIN_MRQ: Gross profit margin for the most recent quarter

        - OPERATING_MARGIN_MRQ: Operating profit margin for the most recent
        quarter

        - NET_MARGIN_MRQ: Net profit margin for the most recent quarter


        **MRQ Other Ratios (2 metrics)**

        - FCF_MARGIN_MRQ: Free cash flow margin for the most recent quarter

        - RD_TO_SALES_TTM: R&D expense as a share of revenue over trailing
        twelve months


        **MRQ Balance Sheet Ratios (5 metrics)**

        All values use Most Recent Quarter (MRQ) balance sheet data

        - DEBT_TO_EQUITY_MRQ: Most recent quarter debt-to-equity ratio

        - DEBT_TO_ASSETS_MRQ: Most recent quarter debt-to-assets ratio

        - CURRENT_RATIO_MRQ: Most recent quarter current ratio

        - QUICK_RATIO_MRQ: Most recent quarter quick ratio (acid-test ratio)

        - NET_WORKING_CAPITAL_MRQ: Net working capital at the most recent
        quarter (an absolute value, not a ratio)


        **Revenue Growth Metrics (4 metrics)**

        - REVENUE_GROWTH_QOQ: Quarter-over-quarter revenue growth rate

        - REVENUE_GROWTH_YOY_QUARTERLY: Year-over-year quarterly revenue growth
        rate

        - REVENUE_GROWTH_YOY_TTM: Year-over-year trailing twelve months revenue
        growth rate

        - REVENUE_GROWTH_YOY_ANNUAL: Year-over-year annual revenue growth rate


        **EPS Growth Metrics (4 metrics)**

        - EPS_GROWTH_QOQ: Quarter-over-quarter earnings per share growth rate

        - EPS_GROWTH_YOY_QUARTERLY: Year-over-year quarterly earnings per share
        growth rate

        - EPS_GROWTH_YOY_TTM: Year-over-year trailing twelve months earnings per
        share growth rate

        - EPS_GROWTH_YOY_ANNUAL: Year-over-year annual earnings per share growth
        rate


        **FCF Growth Metrics (4 metrics)**

        - FCF_GROWTH_QOQ: Quarter-over-quarter free cash flow growth rate

        - FCF_GROWTH_YOY_QUARTERLY: Year-over-year quarterly free cash flow
        growth rate

        - FCF_GROWTH_YOY_TTM: Year-over-year trailing twelve months free cash
        flow growth rate

        - FCF_GROWTH_YOY_ANNUAL: Year-over-year annual free cash flow growth
        rate


        **Response Data Structure**


        Data is grouped by time (timestamp) and sorted in descending order by
        time. Each time group contains:

        - **time**: Observation timestamp (Unix timestamp in seconds, UTC)

        - **items**: Array of symbol-value pairs for this time, each containing:

        - **symbol**: Stock ticker symbol (e.g., "AAPL")

        - **value**: Metric value (double precision, may be negative or decimal)


        **Usage Examples**


        1. **Get AAPL's TTM revenue data**:

        `?metric=REVENUE_TTM&symbol=AAPL&start_time=1672531200&end_time=1704067200`


        2. **Get ROE data for all stocks**:

        `?metric=ROE_TTM&start_time=1672531200&end_time=1704067200`


        3. **Get TSLA's revenue growth rate**:

        `?metric=REVENUE_GROWTH_YOY_TTM&symbol=TSLA&start_time=1672531200&end_time=1704067200`


        **Important Notes**


        - Required parameters: metric, start_time, end_time

        - Optional parameter: symbol (if omitted, returns data for all stocks)

        - All timestamps are Unix timestamps in seconds (UTC)

        - Metric values are double precision floating-point numbers

        - Results are grouped by time and sorted in descending order by time
        (newest first)

        - TTM metrics: sum of current quarter + previous 3 quarters
        (pre-calculated)

        - MRQ metrics: most recent quarterly or period-end values

        - Ratio metrics: expressed as decimals (e.g., 0.25 means 25% or ratio of
        0.25:1)

        - Growth rates: expressed as decimals (NOT percentages). Example: 0.155
        means 15.5% growth; -0.102 means 10.2% decline

        - ROE/ROA denominators use MRQ point-in-time values (not period
        averages)

        - Absolute values: NET_WORKING_CAPITAL_MRQ returns actual dollar amount,
        not a ratio
      parameters:
        - description: Metric type (enum, required)
          in: query
          name: metric
          required: true
          schema:
            type: string
            enum:
              - REVENUE_TTM
              - NET_INCOME_TTM
              - EPS_TTM
              - ROE_TTM
              - ROA_TTM
              - ROIC_TTM
              - GROSS_MARGIN_MRQ
              - OPERATING_MARGIN_MRQ
              - NET_MARGIN_MRQ
              - FCF_MARGIN_MRQ
              - RD_TO_SALES_TTM
              - DEBT_TO_EQUITY_MRQ
              - DEBT_TO_ASSETS_MRQ
              - CURRENT_RATIO_MRQ
              - QUICK_RATIO_MRQ
              - NET_WORKING_CAPITAL_MRQ
              - REVENUE_GROWTH_QOQ
              - REVENUE_GROWTH_YOY_QUARTERLY
              - REVENUE_GROWTH_YOY_TTM
              - REVENUE_GROWTH_YOY_ANNUAL
              - EPS_GROWTH_QOQ
              - EPS_GROWTH_YOY_QUARTERLY
              - EPS_GROWTH_YOY_TTM
              - EPS_GROWTH_YOY_ANNUAL
              - FCF_GROWTH_QOQ
              - FCF_GROWTH_YOY_QUARTERLY
              - FCF_GROWTH_YOY_TTM
              - FCF_GROWTH_YOY_ANNUAL
        - description: Stock symbol (optional, e.g., AAPL)
          in: query
          name: symbol
          schema:
            type: string
        - description: Start time (Unix timestamp in seconds)
          in: query
          name: start_time
          required: true
          schema:
            type: integer
            format: int64
        - description: End time (Unix timestamp in seconds)
          in: query
          name: end_time
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Successfully retrieved financial metrics data
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/model.APIResponse'
                  - properties:
                      data:
                        items:
                          $ref: '#/components/schemas/model.SymbolMetricData'
                        type: array
                    type: object
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/model.APIResponse'
                  - properties:
                      error:
                        $ref: '#/components/schemas/model.APIError'
                    type: object
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/model.APIResponse'
                  - properties:
                      error:
                        $ref: '#/components/schemas/model.APIError'
                    type: object
      security:
        - ApiKeyAuth: []
components:
  schemas:
    model.APIResponse:
      properties:
        data: {}
        error:
          $ref: '#/components/schemas/model.APIError'
        metadata: {}
        pagination: {}
        request_id:
          type: string
        success:
          type: boolean
      type: object
    model.SymbolMetricData:
      properties:
        metric:
          description: Metric type identifier
          example: REVENUE_TTM
          type: string
        symbol:
          description: Stock symbol
          example: AAPL
          type: string
        values:
          description: Time series data points
          items:
            $ref: '#/components/schemas/model.TimeSeriesValue'
          type: array
      type: object
    model.APIError:
      properties:
        code:
          example: RESOURCE_NOT_FOUND
          type: string
        details:
          items:
            $ref: '#/components/schemas/model.APIErrorDetail'
          type: array
        docs_url:
          type: string
        examples:
          items:
            type: string
          type: array
        hint:
          type: string
        message:
          example: The requested resource was not found.
          type: string
        suggestions:
          items:
            type: string
          type: array
      type: object
    model.TimeSeriesValue:
      properties:
        fiscal_year:
          description: Fiscal year
          example: '2024'
          type: string
        observed_at:
          description: >-
            Observation timestamp (Unix timestamp seconds, UTC) - maps from
            gRPC's publish_time
          example: 1672531200
          type: integer
        period:
          description: Fiscal period (Q1/Q2/Q3/Q4/FY)
          example: Q4
          type: string
        value:
          description: Metric value (null if NaN/Inf)
          example: 385000000000.12
          type: number
      type: object
    model.APIErrorDetail:
      properties:
        field:
          type: string
        got:
          type: string
        reason:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: 'API Key authentication. Example: "your-api-key-here"'
      in: header
      name: X-API-Key
      type: apiKey

````