curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatements \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": null,
"p_from": null,
"p_to": null,
"p_tipo_fundo": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatements"
payload = {
"p_cnpj": None,
"p_from": None,
"p_to": None,
"p_tipo_fundo": None
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({p_cnpj: null, p_from: null, p_to: null, p_tipo_fundo: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"fnet_id": 123,
"cnpj": "<string>",
"tipo_fundo": "<string>",
"fund_name": "<string>",
"tipo_documento": "<string>",
"reference_raw": "<string>",
"reference_date": "2023-12-25",
"versao": 123,
"modalidade": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"previous_fnet_id": 123,
"previous_delivered_at": "2023-11-07T05:31:56Z",
"lag_days": 123,
"n_fields_changed": 123,
"diff_status": "<string>"
}
]{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}fund_restatements
Restatement events from the B3 Fundos.NET (FNET) register: one row per document with versao > 1 (modalidade RE voluntary or RC CVM-required, as published), newest delivery first, with cnpj from its cnpjFundo link (NULL when SILO’s fortnightly sweep has not linked it yet — served, never dropped), tipo_fundo from its tipoFundo link (FII / FIDC / ETF; NULL when none), and previous_fnet_id / previous_delivered_at / lag_days for the version it most plausibly replaced. FNET DOES NOT LINK VERSIONS, so the pairing is by a stated group key — (cnpj link, categoria, tipo_documento, especie, reference_raw) — never by fund_name: previous is the group’s document with the highest versao below this one, the greatest fnet_id winning a tie, because a group can legitimately hold several v1 documents (assemblies). Unlinked documents and documents with no reference text are never paired (previous_* NULL). lag_days = delivery date minus the previous delivery date. diff_status says whether SILO has diffed this exact pair (fnet_document_pair.status: compared, or why not — unpairable_no_link, unpairable_no_reference, no_predecessor, body_not_xml, parse_error, unsupported_root, declared_mismatch, body_hash_mismatch; NULL = not diffed, which is every document outside the FIDC informe mensal for now; it is as of the last daily diff run, so a document linked or backfilled since shows its earlier status until the next one), and n_fields_changed is how many rows api.fund_restatement_diff returns for it (NULL unless compared; 0 = re-filed with no field changed). Filter by p_cnpj (window verbatim, NULL = whole history) or by a delivery window (default the 30 days before p_to or today); p_tipo_fundo takes FII, FIDC or ETF and anything else raises 22023. More than 1000 rows RAISES 22023 (never trimmed): narrow the window or pin p_cnpj / p_tipo_fundo.
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.
curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatements \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": null,
"p_from": null,
"p_to": null,
"p_tipo_fundo": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatements"
payload = {
"p_cnpj": None,
"p_from": None,
"p_to": None,
"p_tipo_fundo": None
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({p_cnpj: null, p_from: null, p_to: null, p_tipo_fundo: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_restatements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"fnet_id": 123,
"cnpj": "<string>",
"tipo_fundo": "<string>",
"fund_name": "<string>",
"tipo_documento": "<string>",
"reference_raw": "<string>",
"reference_date": "2023-12-25",
"versao": 123,
"modalidade": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"previous_fnet_id": 123,
"previous_delivered_at": "2023-11-07T05:31:56Z",
"lag_days": 123,
"n_fields_changed": 123,
"diff_status": "<string>"
}
]{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}Authorizations
Body
Response
The result set, newest delivery first. An unknown id is an empty array, not a 404 and never a guessed value.
Was this page helpful?