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

# future_curve

> Every outright futures contract of one root on one B3 session (B3 Price Report BVBG.086.01, b3_futures_settlement), nearest maturity first, as published. p_root is DI1, DOL or WDO; any other root RAISES 22023 listing the three. The columns are the same for every root but do not mean the same thing. DI1 (QUOTED IN RATE): settlement_rate is % a.a. on 252 business days, settlement_price the PU (R$; 100,000 at maturity), prev_settlement_rate the previous session's rate, and open/low/high/avg/close are RATES (the low rate is the high price). DOL (dollar future, USD 50,000 per contract) and WDO (mini dollar future, USD 10,000): QUOTED IN PRICE, BRL per USD 1,000 (B3 contract specification, read 2026-10-21; they mature on the first business day of the contract month, every month). Their open/low/high/avg/close_px and settlement_price are that price as the Price Report prints it, no conversion; settlement_rate and prev_settlement_rate are NULL where B3 prints none, which is the dollar futures' case. Every root: open_interest, contracts traded, trades, notional_brl and settlement_status as published. contract_month is the one derived column: the first day of the month the ticker names, read with B3's month letters (F = January … Z = December). p_trade_date NULL = the newest session held for that root, and a date with no session (a holiday, or before 2018-01-02, when B3's Price Report history starts) returns no rows. More than 1000 rows RAISES 22023 (never trimmed); one session holds about 50 DI1 contracts and fewer dollar ones.

**Row cap.** A window producing more than 1000 rows raises SQLSTATE `22023` naming this function. Nothing is trimmed to fit — PostgREST would silently cut the response at 1000 and a cut-short series is indistinguishable from one that simply ends. This function does not page — narrow the window instead.



## OpenAPI

````yaml /openapi.json post /rpc/future_curve
openapi: 3.1.0
info:
  title: SILO Data API
  version: '91'
  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.** Sixty-six 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 sixty-one 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.** `search_funds` (since v81), `option_chain` and
      `option_exercises` (since v91) refuse (`22023`) when more rows match than
      their per-tier maximum. Zero other functions silently lower `p_limit` to a
      per-tier maximum: nothing is cut to fit. Signing in raises the ceiling.

    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: Gateway
  - 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:
  /rpc/future_curve:
    post:
      tags:
        - Rates
      summary: future_curve
      description: >-
        Every outright futures contract of one root on one B3 session (B3 Price
        Report BVBG.086.01, b3_futures_settlement), nearest maturity first, as
        published. p_root is DI1, DOL or WDO; any other root RAISES 22023
        listing the three. The columns are the same for every root but do not
        mean the same thing. DI1 (QUOTED IN RATE): settlement_rate is % a.a. on
        252 business days, settlement_price the PU (R$; 100,000 at maturity),
        prev_settlement_rate the previous session's rate, and
        open/low/high/avg/close are RATES (the low rate is the high price). DOL
        (dollar future, USD 50,000 per contract) and WDO (mini dollar future,
        USD 10,000): QUOTED IN PRICE, BRL per USD 1,000 (B3 contract
        specification, read 2026-10-21; they mature on the first business day of
        the contract month, every month). Their open/low/high/avg/close_px and
        settlement_price are that price as the Price Report prints it, no
        conversion; settlement_rate and prev_settlement_rate are NULL where B3
        prints none, which is the dollar futures' case. Every root:
        open_interest, contracts traded, trades, notional_brl and
        settlement_status as published. contract_month is the one derived
        column: the first day of the month the ticker names, read with B3's
        month letters (F = January … Z = December). p_trade_date NULL = the
        newest session held for that root, and a date with no session (a
        holiday, or before 2018-01-02, when B3's Price Report history starts)
        returns no rows. More than 1000 rows RAISES 22023 (never trimmed); one
        session holds about 50 DI1 contracts and fewer dollar ones.


        **Row cap.** A window producing more than 1000 rows raises SQLSTATE
        `22023` naming this function. Nothing is trimmed to fit — PostgREST
        would silently cut the response at 1000 and a cut-short series is
        indistinguishable from one that simply ends. This function does not page
        — narrow the window instead.
      operationId: rpc_future_curve
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                p_root:
                  type:
                    - string
                    - 'null'
                  description: Defaults to `'DI1'::text`.
                  default: DI1
                  enum:
                    - DI1
                    - DOL
                    - WDO
                p_trade_date:
                  type:
                    - string
                    - 'null'
                  format: date
                  description: Defaults to `NULL::date`.
                  default: null
      responses:
        '200':
          description: >-
            The result set, nearest maturity first. An unknown id is an empty
            array, not a 404 and never a guessed value.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    trade_date:
                      type:
                        - string
                        - 'null'
                      format: date
                    ticker:
                      type:
                        - string
                        - 'null'
                    contract_month:
                      type:
                        - string
                        - 'null'
                      format: date
                    settlement_rate:
                      type:
                        - number
                        - 'null'
                    settlement_price:
                      type:
                        - number
                        - 'null'
                    prev_settlement_rate:
                      type:
                        - number
                        - 'null'
                    open_interest:
                      type:
                        - integer
                        - 'null'
                      format: int64
                    contracts:
                      type:
                        - integer
                        - 'null'
                      format: int64
                    trades:
                      type:
                        - integer
                        - 'null'
                      format: int32
                    notional_brl:
                      type:
                        - number
                        - 'null'
                    open_px:
                      type:
                        - number
                        - 'null'
                    low_px:
                      type:
                        - number
                        - 'null'
                    high_px:
                      type:
                        - number
                        - 'null'
                    avg_px:
                      type:
                        - number
                        - 'null'
                    close_px:
                      type:
                        - number
                        - 'null'
                    settlement_status:
                      type:
                        - string
                        - 'null'
                    source:
                      type:
                        - string
                        - 'null'
        '400':
          description: >-
            Bad request. Contract violations raise SQLSTATE `22023` with a
            message naming the limit or the argument at fault.
          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.