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

# Company financials

> Get financial metrics of a stock, including earnings per share, net profit, operating income, etc.



## OpenAPI

````yaml reference/securities/securities.yaml GET /securities/stock/financials
openapi: 3.1.0
info:
  title: Securities master reference
  description: >-
    Query general information about US stocks, including company name, sector,
    industry, market cap, financials, key trading statistics
  version: 1.0.0
servers:
  - url: https://openapi.ainvest.com/open
    description: Production environment
security:
  - bearerAuth: []
tags:
  - name: Securities
    description: Provides reference information about US stocks
    externalDocs:
      url: https://docs.ainvest.com/reference/securities
paths:
  /securities/stock/financials:
    get:
      tags:
        - Securities
      summary: Get financial metrics of a stock
      description: >-
        Get financial metrics of a stock, including earnings per share, net
        profit, operating income, etc.
      operationId: getStockFinancials
      parameters:
        - name: ticker
          in: query
          required: true
          description: US stock market ticker symbol, e.g. AAPL, TSLA, etc.
          schema:
            type: string
      responses:
        '200':
          description: Successful response in standard envelope.
          content:
            application/json:
              schema:
                $schema: http://json-schema.org/draft-04/schema#
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/StockFinancials'
                    type: object
                  status_code:
                    type: number
                    description: Status code, `0` for success
                  status_msg:
                    type: string
                    description: Status message, `success` for success
        '400':
          description: >-
            Validation error, i.e. requested stock is not found or parameter is
            not specified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status_code: 4012
                status_msg: Invalid param
components:
  schemas:
    StockFinancials:
      type: object
      properties:
        assets_debt_ratio:
          type: number
          description: >-
            Ratio of total assets to total debt. Indicates the proportion of a
            company's assets financed by debt.
        eps_ttm:
          type: number
          description: >-
            Earnings per share for trailing twelve months. Calculated by
            dividing the company's net income over the last year by the number
            of outstanding shares.
        gross_profit_ttm:
          type: number
          description: >-
            Total gross profit for trailing twelve months. Gross profit is the
            profit a company makes after deducting the direct costs associated
            with producing its goods or services. Gross profit does not include
            indirect or operating expenses like rent, utilities, or marketing
            costs
        gross_profit_ratio_ttm:
          type: number
          description: >-
            Gross profit ratio for trailing twelve months. This indicates the
            percentage of revenue a company retains after accounting for the
            direct costs of producing its goods or services.
        net_profit:
          type: number
          description: >-
            Net profit for the last reporting period. This is the profit a
            company makes after deducting all expenses, including cost of goods
            sold, operating expenses, interest, and taxes.
        net_profit_ttm:
          type: number
          description: Total net profit for trailing twelve months
        net_profit_ratio_ttm:
          type: number
          description: Net profit ratio for trailing twelve months
        net_profit_yoy:
          type: number
          description: Year-over-year net profit growth
        operating_income_total:
          type: number
          description: >-
            Total operating income for the last reporting period. Operating
            income, also known as operating profit, is a company's profit from
            its core business operations after deducting operating expenses such
            as the cost of goods sold, selling expenses, and general &
            administrative expenses. It reflects the profitability of a
            company's day-to-day activities, excluding non-operating items like
            interest and taxes.
        operating_income_total_ttm:
          type: number
          description: Total operating income for trailing twelve months
        operating_income_total_yoy:
          type: number
          description: Year-over-year total operating income growth
        parent_holder_net_profit_ttm:
          type: number
          description: Net profit attributable to parent company for trailing twelve months
        balanced_net_assets:
          type: number
          description: Total net assets per share for the last reporting period.
        roe_ttm:
          type: number
          description: >-
            Return on equity for trailing twelve months. Return on equity (ROE)
            measures how effectively a company uses shareholder investments to
            generate profit. It is calculated by dividing net income (profit) by
            shareholders' equity expressed as a percentage.
        pay_out_ratio:
          type: number
          description: Payout ratio, i.e. percentage of earnings paid out as dividends
        dividend_yield_ratio_ttm:
          type: number
          description: Dividend yield ratio for trailing twelve months
        pb:
          type: number
          description: >-
            Price-to-book ratio. It is a financial metric that compares a
            company's market capitalization to its book value, which is the net
            asset value of the company based on accounting principles.
            Essentially, it reflects how much investors are willing to pay for
            each dollar of a company's net assets.
        pe_ttm:
          type: number
          description: >-
            Price-to-earnings ratio for trailing twelve months. Calculated by
            dividing a company's market capitalization by its net profit over
            the past 12 months.
    Error:
      type: object
      properties:
        status_code:
          type: integer
          description: Business status code
        status_msg:
          type: string
          description: Error message
      required:
        - status_code
        - status_msg
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your key. [Get the key
        here](https://www.ainvest.com/business/developer-manage/)

````