> ## Documentation Index
> Fetch the complete documentation index at: https://octo-98895abd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Statements

> What did the company file? Income, balance sheet, cash flow, headline figures, every stored version, share counts, free float and debt issues.

Example: `/v2/statements?id=PETR4&kind=income`

Kinds:

- `all`: api.financials: every line, one row per account, latest stored version. Paged by date windows. With no id (every kind): the research universe, whose cnpj links a ticker to its filer.
- `income`: api.income_statements: one row per filed period, with period_months.
- `balance`: api.balance_sheets: one row per filed date. A balance sheet is a point in time, so the source has no period_months.
- `cashflow`: api.cash_flow_statements: one row per filed period, with period_months.
- `headline`: api.company_financials: headline figures per filed period. The function takes no p_doc_type, so period is a selection on the rows' doc_type.
- `versions`: api.financial_statement_history: every stored version of one statement (hidden statement, default DRE), with filing metadata. No as_of: it already shows every version.
- `shares`: api.share_counts: issued shares ON / PN / total per filed period, newest first, latest stored version. source cvm_itr / cvm_dfp: quarterly from 2020, with treasury shares. source cvm_fre: yearly from 2010, no treasury count. Per company, not per ticker. Paged by date windows.
- `free_float`: api.free_float: shares in circulation ON / PN / total with the filed percent and the shareholder counts, yearly from 2010 (FRE), newest first, latest stored version. Per company, not per ticker. Paged by date windows.
- `debt_issues`: api.debt_issues: the debt issues (debentures, commercial notes, CRI, CRA, ...) a listed company describes in its FRE, yearly from 2010, newest reference date first, then maturity, latest stored version. One row is one issue as filed, often several series; no ticker or ISIN, so a row does not join to a traded debenture. Listed issuers only. Rate and indexer only in terms_text, free text, never parsed. Per company, not per ticker. Paged by date windows.

With no `from`, a dated kind reads the last 60 months to `to`.

For account-code comparisons use kind=all and read account_code with the filed account_name for each issuer.

For restatements use kind=versions, bound filing dates, and select the statement and account_code to retain matching account rows with version and period spans.

`GET /v2/statements?help` describes the main parameters, `?help=all` adds the hidden ones.



## OpenAPI

````yaml /api-docs/v2/openapi.json get /statements
openapi: 3.1.0
info:
  title: SILO API v2
  version: v2
  description: >-
    The v2 gateway over SILO's schema `api`: 14 resources, five shared
    parameters, one envelope and one error object. Generated from
    supabase/functions/silo-api/registry.ts by scripts/gen_openapi_v2.py; do not
    edit by hand. The original v1 API stays available until it is retired.
servers:
  - url: https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2
    description: The silo-api Edge Function.
security:
  - {}
  - bearerAuth: []
tags:
  - name: Discovery
  - name: Markets and macro
  - name: Companies and funds
  - name: Research
paths:
  /statements:
    get:
      tags:
        - Companies and funds
      summary: Statements
      description: >-
        What did the company file? Income, balance sheet, cash flow, headline
        figures, every stored version, share counts, free float and debt issues.


        Example: `/v2/statements?id=PETR4&kind=income`


        Kinds:


        - `all`: api.financials: every line, one row per account, latest stored
        version. Paged by date windows. With no id (every kind): the research
        universe, whose cnpj links a ticker to its filer.

        - `income`: api.income_statements: one row per filed period, with
        period_months.

        - `balance`: api.balance_sheets: one row per filed date. A balance sheet
        is a point in time, so the source has no period_months.

        - `cashflow`: api.cash_flow_statements: one row per filed period, with
        period_months.

        - `headline`: api.company_financials: headline figures per filed period.
        The function takes no p_doc_type, so period is a selection on the rows'
        doc_type.

        - `versions`: api.financial_statement_history: every stored version of
        one statement (hidden statement, default DRE), with filing metadata. No
        as_of: it already shows every version.

        - `shares`: api.share_counts: issued shares ON / PN / total per filed
        period, newest first, latest stored version. source cvm_itr / cvm_dfp:
        quarterly from 2020, with treasury shares. source cvm_fre: yearly from
        2010, no treasury count. Per company, not per ticker. Paged by date
        windows.

        - `free_float`: api.free_float: shares in circulation ON / PN / total
        with the filed percent and the shareholder counts, yearly from 2010
        (FRE), newest first, latest stored version. Per company, not per ticker.
        Paged by date windows.

        - `debt_issues`: api.debt_issues: the debt issues (debentures,
        commercial notes, CRI, CRA, ...) a listed company describes in its FRE,
        yearly from 2010, newest reference date first, then maturity, latest
        stored version. One row is one issue as filed, often several series; no
        ticker or ISIN, so a row does not join to a traded debenture. Listed
        issuers only. Rate and indexer only in terms_text, free text, never
        parsed. Per company, not per ticker. Paged by date windows.


        With no `from`, a dated kind reads the last 60 months to `to`.


        For account-code comparisons use kind=all and read account_code with the
        filed account_name for each issuer.


        For restatements use kind=versions, bound filing dates, and select the
        statement and account_code to retain matching account rows with version
        and period spans.


        `GET /v2/statements?help` describes the main parameters, `?help=all`
        adds the hidden ones.
      operationId: v2_statements
      parameters:
        - name: kind
          in: query
          required: false
          description: >-
            all: every filed line, long (api.financials). income, balance,
            cashflow: the standard lines, wide. headline: revenue, net income,
            assets, equity, margins (api.company_financials). versions: every
            stored version of one statement (api.financial_statement_history).
            shares: issued and treasury share counts (api.share_counts).
            free_float: shares in circulation and shareholder counts
            (api.free_float). debt_issues: debentures, commercial notes, CRI,
            CRA and other debt the company describes in its FRE, listed issuers
            only, rate as unparsed text (api.debt_issues). Default: all.
          schema:
            type: string
            enum:
              - all
              - income
              - balance
              - cashflow
              - headline
              - versions
              - shares
              - free_float
              - debt_issues
            default: all
          example: income
        - name: period
          in: query
          required: false
          description: >-
            quarterly: ITR filings. annual: DFP filings. A quarterly filing
            holds the 3-month and the year-to-date figure; period_months on the
            row says which. Never add the two. Default: both.
          schema:
            type: string
            enum:
              - both
              - quarterly
              - annual
            default: both
        - name: scope
          in: query
          required: false
          description: >-
            Consolidated and individual are separate filings of the same period;
            they are never merged. Default: consolidated.
          schema:
            type: string
            enum:
              - consolidated
              - individual
            default: consolidated
        - name: id
          in: query
          required: false
          description: >-
            By kind: all, income, balance, cashflow, headline, versions, shares,
            free_float, debt_issues take a listed company's ticker, 14-digit
            CNPJ or CVM code. Required for kinds shares, free_float,
            debt_issues. With no id, kinds all, income, balance, cashflow,
            headline, versions read api.research_universe (what SILO holds).
            Default: none.
          schema:
            type: string
          example: PETR4
        - name: from
          in: query
          required: false
          description: >-
            First date of the window, YYYY-MM-DD. Default: the resource's
            default window, counted back from to.
          schema:
            type: string
            format: date
        - name: to
          in: query
          required: false
          description: >-
            Last date of the window, YYYY-MM-DD. Default: the latest complete
            period, from coverage.
          schema:
            type: string
            format: date
        - name: limit
          in: query
          required: false
          description: >-
            The page size. More rows than one page come through next_page_url,
            never cut silently; a call stops at the tier's rows-per-call cap
            with meta.tier_cap_reached. Default: the tier's page maximum (10
            anonymous, 100 signed in); a larger value is coerced to it.
          schema:
            type: integer
            minimum: 1
        - name: cursor
          in: query
          required: false
          description: >-
            The opaque cursor from a previous next_page_url. It carries every
            other parameter: send it alone (another parameter with a different
            value is bad_request). Default: none: the first page.
          schema:
            type: string
        - name: as_of
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). Point in time: only
            documents CVM received before this date, at the highest version
            known then. Not for kind versions. Default: none: the latest stored
            version of every document, which is NOT point in time.
          schema:
            type: string
            format: date
        - name: account_code
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). For all or versions: exact
            filed account code. Check its filed label before comparing issuers.
            Omit for every line. Default: none: return all accounts.
          schema:
            type: string
        - name: statement
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). kind versions: the one
            statement to read (DRE income, BPA assets, BPP liabilities and
            equity, DFC_MD or DFC_MI cash flow, DMPL, DRA, DVA). Default: DRE.
          schema:
            type: string
            enum:
              - DRE
              - BPA
              - BPP
              - DFC_MD
              - DFC_MI
              - DMPL
              - DRA
              - DVA
            default: DRE
      responses:
        '200':
          description: The v2 envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        default:
          description: >-
            The v2 error object. A SILO refusal (over_limit) keeps its message,
            hint and details verbatim.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Envelope:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items: {}
          description: Always a list. Rows as the endpoint returned them; null stays null.
        meta:
          type: object
          required:
            - resource
            - kind
            - request
            - id_known
          properties:
            resource:
              type: string
            kind:
              type:
                - string
                - 'null'
            request:
              type: object
              description: Every parameter the resource takes, with the default applied.
            id_known:
              type:
                - boolean
                - 'null'
              description: Whether SILO holds the id; null when the call names none.
            endpoint:
              type: string
              description: The data endpoint that answered.
            source:
              type: string
              description: >-
                The canonical request to cite: /v2/<resource>? with every
                applied parameter, defaults included, so it replays the same
                rows. POST says so; its lists are in meta.body.
            data_through:
              type:
                - string
                - 'null'
              format: date
              description: >-
                The newest elapsed period SILO holds for the dataset this
                endpoint reads (the coverage resource's data_through for
                coverage_dataset). Null when no coverage row applies or the
                coverage read failed; never a guess.
            coverage_dataset:
              type:
                - string
                - 'null'
              description: >-
                The coverage dataset data_through comes from; null when none
                applies.
            data_through_error:
              type: string
              description: >-
                Present only when the coverage read failed: why data_through is
                null. The rows are unaffected.
            tier:
              type: string
              enum:
                - anonymous
                - signed_in
                - pro
            tier_cap_reached:
              type: boolean
              description: True when the result is partial because of the tier cap.
          additionalProperties: true
        next_page_url:
          type: string
          description: Present only when more rows remain. It carries one opaque cursor.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - reason
            - message
            - target
            - innererror
          properties:
            code:
              type: string
              enum:
                - bad_request
                - unknown_parameter
                - unknown_id
                - unauthorized
                - payment_required
                - forbidden_for_tier
                - over_limit
                - rate_limited
                - timeout
                - unavailable
                - internal
            reason:
              type:
                - string
                - 'null'
              enum:
                - row_cap
                - tier_cap
                - null
              description: >-
                over_limit only: row_cap (over one 1,000-row page: narrow or
                page) or tier_cap (over the tier ceiling: narrow or sign in).
                Null otherwise.
            message:
              type: string
            target:
              type:
                - string
                - 'null'
            innererror:
              type: object
              properties:
                sqlstate:
                  type:
                    - string
                    - 'null'
                hint:
                  type:
                    - string
                    - 'null'
                details:
                  type:
                    - string
                    - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: SILO user access token for authenticated data requests.

````

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