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

# cash_securities

> Unadjusted B3 cash quotes for cash_security: everything else on the cash board — subscription rights, receipts, and other non-share paper. Grain (ticker, trade_date, board, term_days, lot) — lot is standard (tpmerc 010) or odd (020) or block (021), so filter lot=eq.standard for round lots only. Classified from published TPMERC/ESPECI; never inferred.

**Paging.** A GET view pages normally with `limit`/`offset` (and `Range`). Every response is cut at 1000 rows server-side regardless of tier; read `Content-Range` to detect it (`0-999/*` is a truncated page, and `Prefer: count=exact` turns the `*` into the total).



## OpenAPI

````yaml /openapi.json get /cash_securities
openapi: 3.1.0
info:
  title: SILO Data API
  version: '75'
  summary: >-
    Read-only Brazilian public financial data: CVM filings, BACEN series, B3
    quotes and the B3 BDI group.
  description: >
    Schema `api` over PostgREST. Views are `GET /<view>`; functions are

    `POST /rpc/<function>` with a JSON body.


    **This document is generated** from the live Postgres catalog by

    `scripts/gen_openapi.py` — `pg_get_function_arguments` for the RPC
    signatures,

    `information_schema.columns` for the view columns, and the granted-to-`anon`

    privilege set for which objects exist at all. It is not hand-maintained, and

    `tests/test_openapi_spec.py` fails the build when it drifts from the SQL.


    ### Two different ceilings


    Reading one for the other is the most expensive mistake on this API.


    * **The row cap refuses.** Fifty-nine set-returning functions raise SQLSTATE
      `22023` when the window they were handed would produce more than 1000 rows.
      Nothing is trimmed, and the error says why and how to fix it (the message,
      plus PostgREST's `details` and `hint`). Five of them (`panel`,
      `quote_history`, `fund_nav`, `index_history`, `trade_consolidated_history`)
      take a `p_after` cursor so you can walk the series; the other fifty-four ask you to narrow the window. `fund_nav` paging
      additionally REQUIRES `p_entity_type` — its cursor is a bare period, which
      is unique only within one family, and CNPJs that file under both `fi` and
      `fidc` in the same month would otherwise be ambiguous.
    * **The tier ceiling clamps.** Three other functions (`search_funds`,
      `option_chain`, `option_exercises`) silently lower `p_limit` to a per-tier maximum. No error is raised, so the
      only way to know the result was cut is to know the ceiling. Signing in
      raises it.

    Separately from both, PostgREST's server-wide `db-max-rows = 1000` cuts
    every

    response, on every endpoint, for every tier. On the GET views
    `Content-Range`

    is the signal (`0-999/*`); `Prefer: count=exact` turns the `*` into a total.


    ### Retention


    Most of this warehouse is append-only history. The **B3 BDI group** —

    `short_interest`, `short_interest_by_sector`, `investor_flow`,

    `lending_trades`, `lending_participants` — is not: B3 keeps roughly 21
    business

    days and publishes no archive. A missed session cannot be bought back. See

    Market Coverage.
  license:
    name: See repository
    url: https://github.com/PedroDnT/SILO-BZ
servers:
  - url: https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1
    description: Supabase PostgREST, schema `api`
security:
  - apikey: []
tags:
  - name: ANBIMA
  - name: Company events
  - name: Coverage & catalog
  - name: Derivatives
  - name: FIDC
  - name: FNET documents
  - name: Financials
  - name: Funds
  - name: Holdings
  - name: Inflation
  - name: Lookup
  - name: Macro
  - name: Macro expectations
  - name: Other
  - name: Panel
  - name: Portfolio
  - name: Quotes
  - name: Rates
  - name: Research
  - name: Screens
  - name: Securities lending
  - name: Short interest & flows
paths:
  /cash_securities:
    get:
      tags:
        - Quotes
      summary: cash_securities
      description: >-
        Unadjusted B3 cash quotes for cash_security: everything else on the cash
        board — subscription rights, receipts, and other non-share paper. Grain
        (ticker, trade_date, board, term_days, lot) — lot is standard (tpmerc
        010) or odd (020) or block (021), so filter lot=eq.standard for round
        lots only. Classified from published TPMERC/ESPECI; never inferred.


        **Paging.** A GET view pages normally with `limit`/`offset` (and
        `Range`). Every response is cut at 1000 rows server-side regardless of
        tier; read `Content-Range` to detect it (`0-999/*` is a truncated page,
        and `Prefer: count=exact` turns the `*` into the total).
      operationId: get_cash_securities
      parameters:
        - name: select
          in: query
          required: false
          schema:
            type: string
          description: Columns to return, comma separated. Omit for all of them.
        - name: order
          in: query
          required: false
          schema:
            type: string
          description: >-
            Sort, e.g. `trade_date.desc`. Always order a paged read, or
            `limit`/`offset` walk an undefined sequence.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
          description: >-
            Rows to return. The server cuts every response at 1000 whatever you
            ask for.
        - name: offset
          in: query
          required: false
          schema:
            type: integer
          description: Rows to skip. Pairs with `limit` and `order` to page.
        - name: ticker
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `ticker` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `ticker=eq.<value>`).
        - name: trade_date
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `trade_date` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `trade_date=eq.<value>`).
        - name: board
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `board` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `board=eq.<value>`).
        - name: lot
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `lot` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `lot=eq.<value>`).
        - name: term_days
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `term_days` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `term_days=eq.<value>`).
        - name: short_name
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `short_name` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `short_name=eq.<value>`).
        - name: spec
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `spec` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `spec=eq.<value>`).
        - name: currency
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `currency` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `currency=eq.<value>`).
        - name: open
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `open` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `open=eq.<value>`).
        - name: high
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `high` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `high=eq.<value>`).
        - name: low
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `low` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `low=eq.<value>`).
        - name: average
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `average` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `average=eq.<value>`).
        - name: close
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `close` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `close=eq.<value>`).
        - name: bid
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `bid` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `bid=eq.<value>`).
        - name: ask
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `ask` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `ask=eq.<value>`).
        - name: trades
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `trades` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `trades=eq.<value>`).
        - name: quantity
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `quantity` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `quantity=eq.<value>`).
        - name: volume
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `volume` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `volume=eq.<value>`).
        - name: isin
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `isin` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `isin=eq.<value>`).
        - name: quotation_factor
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `quotation_factor` — `eq.`, `neq.`, `gt.`,
            `gte.`, `lt.`, `lte.`, `in.`, `is.` (e.g.
            `quotation_factor=eq.<value>`).
        - name: adjusted
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `adjusted` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `adjusted=eq.<value>`).
        - name: source
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `source` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `source=eq.<value>`).
        - name: fetched_at
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `fetched_at` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `fetched_at=eq.<value>`).
        - name: close_unit
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `close_unit` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `close_unit=eq.<value>`).
        - name: market
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `market` — `eq.`, `neq.`, `gt.`, `gte.`, `lt.`,
            `lte.`, `in.`, `is.` (e.g. `market=eq.<value>`).
        - name: contract_price
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `contract_price` — `eq.`, `neq.`, `gt.`, `gte.`,
            `lt.`, `lte.`, `in.`, `is.` (e.g. `contract_price=eq.<value>`).
        - name: contract_expiry
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `contract_expiry` — `eq.`, `neq.`, `gt.`,
            `gte.`, `lt.`, `lte.`, `in.`, `is.` (e.g.
            `contract_expiry=eq.<value>`).
        - name: contract_correction
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `contract_correction` — `eq.`, `neq.`, `gt.`,
            `gte.`, `lt.`, `lte.`, `in.`, `is.` (e.g.
            `contract_correction=eq.<value>`).
        - name: contract_points
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `contract_points` — `eq.`, `neq.`, `gt.`,
            `gte.`, `lt.`, `lte.`, `in.`, `is.` (e.g.
            `contract_points=eq.<value>`).
        - name: contract_points_raw
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `contract_points_raw` — `eq.`, `neq.`, `gt.`,
            `gte.`, `lt.`, `lte.`, `in.`, `is.` (e.g.
            `contract_points_raw=eq.<value>`).
        - name: distribution_number
          in: query
          required: false
          schema:
            type: string
          description: >-
            PostgREST filter on `distribution_number` — `eq.`, `neq.`, `gt.`,
            `gte.`, `lt.`, `lte.`, `in.`, `is.` (e.g.
            `distribution_number=eq.<value>`).
      responses:
        '200':
          description: Matching rows.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    ticker:
                      type:
                        - string
                        - 'null'
                    trade_date:
                      type:
                        - string
                        - 'null'
                      format: date
                    board:
                      type:
                        - string
                        - 'null'
                    lot:
                      type:
                        - string
                        - 'null'
                    term_days:
                      type:
                        - string
                        - 'null'
                    short_name:
                      type:
                        - string
                        - 'null'
                    spec:
                      type:
                        - string
                        - 'null'
                    currency:
                      type:
                        - string
                        - 'null'
                    open:
                      type:
                        - number
                        - 'null'
                    high:
                      type:
                        - number
                        - 'null'
                    low:
                      type:
                        - number
                        - 'null'
                    average:
                      type:
                        - number
                        - 'null'
                    close:
                      type:
                        - number
                        - 'null'
                    bid:
                      type:
                        - number
                        - 'null'
                    ask:
                      type:
                        - number
                        - 'null'
                    trades:
                      type:
                        - integer
                        - 'null'
                      format: int32
                    quantity:
                      type:
                        - number
                        - 'null'
                    volume:
                      type:
                        - number
                        - 'null'
                    isin:
                      type:
                        - string
                        - 'null'
                    quotation_factor:
                      type:
                        - integer
                        - 'null'
                      format: int32
                    adjusted:
                      type:
                        - boolean
                        - 'null'
                    source:
                      type:
                        - string
                        - 'null'
                    fetched_at:
                      type:
                        - string
                        - 'null'
                      format: date-time
                    close_unit:
                      type:
                        - number
                        - 'null'
                    market:
                      type:
                        - string
                        - 'null'
                    contract_price:
                      type:
                        - number
                        - 'null'
                    contract_expiry:
                      type:
                        - string
                        - 'null'
                      format: date
                    contract_correction:
                      type:
                        - string
                        - 'null'
                    contract_points:
                      type:
                        - number
                        - 'null'
                    contract_points_raw:
                      type:
                        - string
                        - 'null'
                    distribution_number:
                      type:
                        - string
                        - 'null'
          headers:
            Content-Range:
              description: >-
                `0-999/*` means the page was cut at 1000. Send `Prefer:
                count=exact` for the total.
              schema:
                type: string
        '400':
          description: Bad request — a malformed filter or an unparseable argument.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No usable `apikey`, or a request for a schema outside `api`.
            `Accept-Profile: public` and any `cvm_*` / `b3_cotahist` / `cia_*`
            path answer 401 for every caller, by grant — schema `api` is the
            entire public surface.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such endpoint in schema `api`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      description: >-
        PostgREST error body. `code` carries the SQLSTATE — `22023` is a
        contract refusal.
      properties:
        code:
          type:
            - string
            - 'null'
          examples:
            - '22023'
        message:
          type:
            - string
            - 'null'
        details:
          type:
            - string
            - 'null'
        hint:
          type:
            - string
            - 'null'
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        The publishable key (`sb_publishable_…`), on every request. It is NOT a
        JWT — sending it as `Authorization: Bearer` is rejected as an invalid
        JWT. It identifies the project, not you, and maps to the Postgres `anon`
        role.

````

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