fund_investors
curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_investors \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": "<string>",
"p_from": null,
"p_to": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_investors"
payload = {
"p_cnpj": "<string>",
"p_from": None,
"p_to": 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: '<string>', p_from: null, p_to: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_investors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"cnpj": "<string>",
"period": "2023-12-25",
"fund_type": "<string>",
"holders_pf_pb": 123,
"holders_pf_varejo": 123,
"holders_pj_nao_financ_pb": 123,
"holders_pj_nao_financ_varejo": 123,
"holders_banco": 123,
"holders_corretora_distrib": 123,
"holders_pj_financ": 123,
"holders_invnr": 123,
"holders_eapc": 123,
"holders_efpc": 123,
"holders_rpps": 123,
"holders_segur": 123,
"holders_capitaliz": 123,
"holders_fi_clube": 123,
"holders_distrib": 123,
"holders_outro": 123,
"pl_pct_pf_pb": 123,
"pl_pct_pf_varejo": 123,
"pl_pct_pj_nao_financ_pb": 123,
"pl_pct_pj_nao_financ_varejo": 123,
"pl_pct_banco": 123,
"pl_pct_corretora_distrib": 123,
"pl_pct_pj_financ": 123,
"pl_pct_invnr": 123,
"pl_pct_eapc": 123,
"pl_pct_efpc": 123,
"pl_pct_rpps": 123,
"pl_pct_segur": 123,
"pl_pct_capitaliz": 123,
"pl_pct_fi_clube": 123,
"pl_pct_distrib": 123,
"pl_pct_outro": 123,
"largest_holder_pl_pct": 123
}
]{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}{
"code": "22023",
"message": "<string>",
"details": "<string>",
"hint": "<string>"
}Funds
fund_investors
One FI fund's monthly investor profile (CVM PERFIL_MENSAL), oldest first: one row per stored (cnpj, period), period being the month's last day (DT_COMPTC). For each of CVM's 16 investor types (pf_pb, pf_varejo, pj_nao_financ_pb, pj_nao_financ_varejo, banco, corretora_distrib, pj_financ, invnr, eapc, efpc, rpps, segur, capitaliz, fi_clube, distrib, outro): holders_<type> is the number of quotaholders of that type (NR_COTST_*) and pl_pct_<type> their share of the fund's PL in percent as filed (PR_PL_COTST_*), never rescaled. largest_holder_pl_pct is PR_PATRIM_LIQ_MAIOR_COTST, the largest single quotaholder's share of PL in percent as filed; CVM files 0 for most funds, so a 0 is not evidence of no concentration. Nothing is derived: no type is merged, no total or retail split is computed, shares are not normalised to 100, and no investor is identified. NULL means the source left it blank, never zero. Months ingested before the typed columns existed are read from the raw source row, validated (digits only for counts, digits with one decimal separator for percentages; anything else NULL). FI funds only, from 2019-01. Not point-in-time: the newest file ingested for each month. p_cnpj is required (punctuation is stripped); p_from / p_to bound period (NULL = no bound). More than 1000 rows RAISES 22023 (never trimmed): narrow the window.
**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.
POST
/
rpc
/
fund_investors
fund_investors
curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_investors \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": "<string>",
"p_from": null,
"p_to": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_investors"
payload = {
"p_cnpj": "<string>",
"p_from": None,
"p_to": 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: '<string>', p_from: null, p_to: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_investors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"cnpj": "<string>",
"period": "2023-12-25",
"fund_type": "<string>",
"holders_pf_pb": 123,
"holders_pf_varejo": 123,
"holders_pj_nao_financ_pb": 123,
"holders_pj_nao_financ_varejo": 123,
"holders_banco": 123,
"holders_corretora_distrib": 123,
"holders_pj_financ": 123,
"holders_invnr": 123,
"holders_eapc": 123,
"holders_efpc": 123,
"holders_rpps": 123,
"holders_segur": 123,
"holders_capitaliz": 123,
"holders_fi_clube": 123,
"holders_distrib": 123,
"holders_outro": 123,
"pl_pct_pf_pb": 123,
"pl_pct_pf_varejo": 123,
"pl_pct_pj_nao_financ_pb": 123,
"pl_pct_pj_nao_financ_varejo": 123,
"pl_pct_banco": 123,
"pl_pct_corretora_distrib": 123,
"pl_pct_pj_financ": 123,
"pl_pct_invnr": 123,
"pl_pct_eapc": 123,
"pl_pct_efpc": 123,
"pl_pct_rpps": 123,
"pl_pct_segur": 123,
"pl_pct_capitaliz": 123,
"pl_pct_fi_clube": 123,
"pl_pct_distrib": 123,
"pl_pct_outro": 123,
"largest_holder_pl_pct": 123
}
]{
"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
application/json
Response
The result set, oldest first. An unknown id is an empty array, not a 404 and never a guessed value.
Was this page helpful?