curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro \
--header 'Authorization: Bearer <token>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>",
"source": "<string>",
"data_through": "2023-12-25",
"coverage_dataset": "<string>",
"data_through_error": "<string>",
"tier": "anonymous",
"tier_cap_reached": true
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"reason": "row_cap",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Macro
Macro series, inflation and its item tree, PTAX, Focus expectations.
Example: /v2/macro?kind=inflation
Kinds:
series: api.macro_series: one SGS series by label or code, oldest first. Refuses above 1000 rows: narrow from/to.inflation: api.inflation: the IPCA set by month with acc_12m, 3 years by default. Refuses above 1000 rows: pin id or family, or narrow from.inflation_items: api.inflation_items: IBGE’s IPCA tree (weight, monthly change, contribution, year-to-date and 12-month change), 3 years by default. With no id, the groups (level 1); with an id, that item at its own level.fx: api.ptax: one currency’s PTAX, BRL per one unit, as published. currency=all reads the api.ptax_daily view, every currency at once.expectations: api.focus_expectations: one survey and horizon across survey dates (the weekly revision path), median, mean and standard deviation. Refuses above 1000 rows.
With no from, a dated kind reads the last 12 months to to.
id per kind: series takes a label or SGS code (SELIC_META, CDI, IGPM, 432); inflation one series label (IPCA, IPCA_CORE_EX0, …; none: every series); inflation_items an IBGE structure number or SIDRA item code (none: the groups); expectations a Focus indicator (IPCA, Selic, …; none: every indicator).
BACEN’s IPCA group codes 1640-1643 are Comunicação, Saúde, Despesas pessoais, Educação, as measured against SIDRA. Focus rows are baseCalculo=0 (the trailing 30-day sample); the 12-month inflation survey is unsmoothed. Nothing is filled.
GET /v2/macro?help describes the main parameters, ?help=all adds the hidden ones.
curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro \
--header 'Authorization: Bearer <token>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>",
"source": "<string>",
"data_through": "2023-12-25",
"coverage_dataset": "<string>",
"data_through_error": "<string>",
"tier": "anonymous",
"tier_cap_reached": true
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"reason": "row_cap",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Authorizations
Query Parameters
series: one BACEN SGS series. inflation: the IPCA set (headline, cores, groups, diffusion) with 12-month accumulation. inflation_items: IBGE's IPCA item tree with weights. fx: BACEN PTAX buy and sell rates. expectations: the BCB Focus survey path. Default: series.
series, inflation, inflation_items, fx, expectations By kind: series takes an SGS series label or code (SELIC_META, CDI, IGPM, 432); inflation takes one series label (IPCA, IPCA_CORE_EX0, ...; none: every series); inflation_items takes an IBGE structure number or SIDRA item code (none: the groups); expectations takes a Focus indicator (IPCA, Selic, ...; none: every indicator). Required for kind series. Kind fx takes no id. Default: none.
Hidden parameter (?help=all lists it). kind inflation: headline, core, classification, diffusion or group (all: every family). kind expectations: the Focus survey, annual (the default), monthly, selic (COPOM meetings) or inflation_12m. Default: all.
all, headline, core, classification, diffusion, group, annual, monthly, selic, inflation_12m Hidden parameter (?help=all lists it). kind expectations: one target horizon per call. Use a single YYYY for annual, MM/YYYY for monthly, or a meeting code such as R6/2028 for selic. from and to filter survey dates, not target dates. Default: family annual: the current year (UTC-3); every other survey needs one.
Was this page helpful?