> ## 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.

# Fidc

> What is inside this FIDC? Portfolio, tranches, aging, cedentes, sacados.

Example: `/v2/fidc?id=<cnpj>&kind=tranches`

Kinds:

- `portfolio`: api.fidc_portfolio, newest first. Paged by date windows. With no id: the FIDC registry, ordered by cnpj.
- `tranches`: api.fidc_tranches: per series, quota value, quotaholders and returns. Paged by date windows.
- `aging`: api.fidc_aging: the to_maturity, overdue and overdue_total ladders. Paged by date windows.
- `cedentes`: api.fidc_cedentes: the originators a fund buys from, or with cedente the funds that buy from one. Paged by date windows.
- `sacados`: api.fidc_sacados: the largest debtors, as anonymized ranks (there is no debtor-side lookup). Paged by date windows.

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

id is a FIDC CNPJ: 14 digits, punctuation allowed. With no id, kind=portfolio lists the FIDC registry (api.funds, entity_type fidc).

FIDC delinquency (api.fund_nav, panel) starts 2013-01 and is on every row only from 2020-11 (regime break; coverage?kind=catalog lists it under regime_breaks). Through 2020-10-31 a fund with no tab VI row that month is null, not zero and not clean books; from 2020-11-30 it is filed on every row (a fund with none files 0). Never read a pre-2020-11 null as zero or fill it, and never compare a count of reporting funds across 2020-10 -&gt; 2020-11.

Tab X (the SCR grade ladders of kind=portfolio) is filed from 2023-10: earlier months have no scr rows, not zero-graded ones. Values are as filed.

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



## OpenAPI

````yaml /api-docs/v2/openapi.json get /fidc
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:
  /fidc:
    get:
      tags:
        - Companies and funds
      summary: Fidc
      description: >-
        What is inside this FIDC? Portfolio, tranches, aging, cedentes, sacados.


        Example: `/v2/fidc?id=<cnpj>&kind=tranches`


        Kinds:


        - `portfolio`: api.fidc_portfolio, newest first. Paged by date windows.
        With no id: the FIDC registry, ordered by cnpj.

        - `tranches`: api.fidc_tranches: per series, quota value, quotaholders
        and returns. Paged by date windows.

        - `aging`: api.fidc_aging: the to_maturity, overdue and overdue_total
        ladders. Paged by date windows.

        - `cedentes`: api.fidc_cedentes: the originators a fund buys from, or
        with cedente the funds that buy from one. Paged by date windows.

        - `sacados`: api.fidc_sacados: the largest debtors, as anonymized ranks
        (there is no debtor-side lookup). Paged by date windows.


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


        id is a FIDC CNPJ: 14 digits, punctuation allowed. With no id,
        kind=portfolio lists the FIDC registry (api.funds, entity_type fidc).


        FIDC delinquency (api.fund_nav, panel) starts 2013-01 and is on every
        row only from 2020-11 (regime break; coverage?kind=catalog lists it
        under regime_breaks). Through 2020-10-31 a fund with no tab VI row that
        month is null, not zero and not clean books; from 2020-11-30 it is filed
        on every row (a fund with none files 0). Never read a pre-2020-11 null
        as zero or fill it, and never compare a count of reporting funds across
        2020-10 -&gt; 2020-11.


        Tab X (the SCR grade ladders of kind=portfolio) is filed from 2023-10:
        earlier months have no scr rows, not zero-graded ones. Values are as
        filed.


        `GET /v2/fidc?help` describes the main parameters, `?help=all` adds the
        hidden ones.
      operationId: v2_fidc
      parameters:
        - name: kind
          in: query
          required: false
          description: >-
            portfolio: the receivables book, long (tab II sectors, tab X SCR
            ladders, tax debt). tranches: each senior and subordinated series.
            aging: the to-maturity and overdue ladders. cedentes: the
            originators it buys from. sacados: its largest debtors, as
            anonymized ranks. Default: portfolio.
          schema:
            type: string
            enum:
              - portfolio
              - tranches
              - aging
              - cedentes
              - sacados
            default: portfolio
          example: tranches
        - name: id
          in: query
          required: false
          description: >-
            By kind: portfolio, tranches, aging, cedentes, sacados take a FIDC's
            14-digit fund CNPJ (punctuation allowed). Required for kinds
            tranches, aging, sacados. Kind cedentes: id or cedente is required.
            With no id, kind portfolio reads api.funds (what SILO holds).
            Default: none.
          schema:
            type: string
          example: <cnpj>
        - 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: series
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). kind=tranches: one
            TAB_X_CLASSE_SERIE, matched exactly as filed. Default: all.
          schema:
            type: string
            default: all
        - name: cedente
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). kind=cedentes, instead of
            id: the funds that buy from this originator (CPF or CNPJ, or a
            listed ticker or CVM code). Default: all.
          schema:
            type: string
            default: all
        - name: item
          in: query
          required: false
          description: >-
            Hidden parameter (`?help=all` lists it). kind=portfolio: one part of
            the book, matched against the row's kind column: sector (tab II),
            scr_debtor or scr_operation (tab X ladders), tax_debt. Default: all.
          schema:
            type: string
            enum:
              - all
              - sector
              - scr_debtor
              - scr_operation
              - tax_debt
            default: all
      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.