Skip to main content
Parameters, response columns and types are generated from the SQL catalog and render under Endpoints → Macro in the sidebar. This page carries what a schema cannot: what each unit means and the three series that are easy to misread.

Overview

Two functions over BACEN data Silo already ingests daily. Nothing is derived — no annualisation, compounding, averaging, mid rate or fill. IPCA is not here: it is inflation, with its own units and caveats.
  • macro_series(p_series, p_from, p_to) — one SGS series, oldest first.
  • ptax(p_currency, p_from, p_to) — PTAX buy and sell for one currency.

The series

p_series takes the label or the SGS code. Read unit on every row before doing arithmetic. An IPCA label or code is refused with a pointer to inflation; anything else unknown raises 22023 listing the thirteen. Default window: 12 months for the daily series, 120 for the monthly ones.

Four series that are easy to misread

  • SELIC_META is published ahead. BACEN dates the target per calendar day and carries it forward to the next Copom meeting (on 2026-09-25 the series already ran to 2026-11-04). The default window ends today; an explicit p_to after today can return those forward-dated rows.
  • CDI and SELIC_DIARIA are per business day. 0.050788 is % per day, not per year. Compounding it to an annual rate is your calculation — do it in the notebook and say so.
  • NFSP_* is a borrowing requirement. A positive value is a deficit, a negative one a surplus. BACEN dates the fiscal month on its first day and publishes it about 60 days later, so the newest row is two months old.
  • POUPANCA is the old-rule return, per anniversary day. SGS 25 is BACEN’s Depósitos de poupança até 03.05.2012 – Rentabilidade no período: one value per anniversary day, each the return over the month that starts on that date. It is not a calendar-month figure and not the return of deposits made after 2012-05-03.

PTAX

One row per currency and business day: buy_rate (compra) and sell_rate (venda), BRL per one unit of the currency — JPY and ARS included. The currencies are the ones Silo ingests (USD, EUR, GBP, JPY, ARS); an unknown code raises 22023 listing the ones held. BACEN prints up to five bulletins a day (opening, three intermediate, closing). Silo keeps the last one it received, which for a completed day is the closing PTAX — measured on 2026-09-22/23, the stored USD sell rate equals SGS 1 and BACEN’s Fechamento bulletin to four decimals. The bulletin type is not stored. A holiday has no row; nothing is filled.

Freshness

coverage() has a macro_series row (the newest elapsed observation of any of the nine — their cadences differ, so read a monthly series’ own last row before calling it late) and a ptax row. Each landed_at is its own ingest: an SGS run never reports as PTAX freshness, or the reverse.

Focus expectations

focus_expectations(p_endpoint, p_horizon, p_indicator, p_from, p_to) returns BCB’s Focus survey path for one exact endpoint and horizon: ExpectativasMercadoAnuais, ExpectativaMercadoMensais, ExpectativasMercadoSelic or ExpectativasMercadoInflacao12Meses. Each survey_date is one published observation, so successive dates form the weekly revision path.
  • It gives median, mean and standard deviation for baseCalculo=0, the trailing 30-day respondent sample. The 12-month inflation endpoint is unsmoothed.
  • p_horizon keeps BACEN’s DataReferencia exactly: a year (2027) or a month (09/2026).
  • The default window is five years. More than 1,000 rows raises 22023; narrow the window.
  • It is not an archive of later corrections to an old survey date. Horizons collapsed before migration 16 are not recovered until they are fetched again.

Limits

Both refuse above one 1,000-row page (22023); narrow p_from / p_to. A daily series fits about three years per call.