curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_holdings \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": null,
"p_ticker": null,
"p_from": null,
"p_to": null,
"p_kind": "equity",
"p_limit": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_holdings"
payload = {
"p_cnpj": None,
"p_ticker": None,
"p_from": None,
"p_to": None,
"p_kind": "equity",
"p_limit": 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_ticker: null,
p_from: null,
p_to: null,
p_kind: 'equity',
p_limit: null
})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_holdings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"cnpj": "<string>",
"period": "2023-12-25",
"kind": "<string>",
"held_id": "<string>",
"held_name": "<string>",
"tp_aplic": "<string>",
"tp_negoc": "<string>",
"emissor_ligado": "<string>",
"qt_pos_final": 123,
"vl_merc_pos_final": 123,
"fund_name": "<string>",
"position_kind": "<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_holdings
Fund holdings from CDA blocks 4 (equities, by B3 ticker) and 2 (held funds, by CNPJ). Give exactly one of p_cnpj (what this fund holds) or p_ticker (which funds hold this ticker). Rows are as filed; nothing is summed across application types. fund_name is the holding fund’s name. position_kind reads tp_aplic: owned, lent (cedidos em empréstimo), borrowed (the obligation for shares received on loan, usually sold short), derivative (options, futures, forwards), or NULL for a label outside the known list. Do not sum borrowed or derivative rows with owned rows.
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_holdings \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": null,
"p_ticker": null,
"p_from": null,
"p_to": null,
"p_kind": "equity",
"p_limit": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_holdings"
payload = {
"p_cnpj": None,
"p_ticker": None,
"p_from": None,
"p_to": None,
"p_kind": "equity",
"p_limit": 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_ticker: null,
p_from: null,
p_to: null,
p_kind: 'equity',
p_limit: null
})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_holdings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"cnpj": "<string>",
"period": "2023-12-25",
"kind": "<string>",
"held_id": "<string>",
"held_name": "<string>",
"tp_aplic": "<string>",
"tp_negoc": "<string>",
"emissor_ligado": "<string>",
"qt_pos_final": 123,
"vl_merc_pos_final": 123,
"fund_name": "<string>",
"position_kind": "<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, oldest first. An unknown id is an empty array, not a 404 and never a guessed value.
Was this page helpful?