curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": "<string>",
"p_from": "2019-01-01",
"p_to": null,
"p_entity_type": null,
"p_after": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav"
payload = {
"p_cnpj": "<string>",
"p_from": "2019-01-01",
"p_to": None,
"p_entity_type": None,
"p_after": 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: '2019-01-01',
p_to: null,
p_entity_type: null,
p_after: null
})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'p_cnpj' => '<string>',
'p_from' => '2019-01-01',
'p_to' => null,
'p_entity_type' => null,
'p_after' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav"
payload := strings.NewReader("{\n \"p_cnpj\": \"<string>\",\n \"p_from\": \"2019-01-01\",\n \"p_to\": null,\n \"p_entity_type\": null,\n \"p_after\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"p_cnpj\": \"<string>\",\n \"p_from\": \"2019-01-01\",\n \"p_to\": null,\n \"p_entity_type\": null,\n \"p_after\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"p_cnpj\": \"<string>\",\n \"p_from\": \"2019-01-01\",\n \"p_to\": null,\n \"p_entity_type\": null,\n \"p_after\": null\n}"
response = http.request(request)
puts response.read_body[
{
"cnpj": "<string>",
"period": "2023-12-25",
"entity_type": "<string>",
"nav": 123,
"quota": 123,
"quotaholders": 123,
"delinquency": 123,
"monthly_yield": 123,
"inflows": 123,
"redemptions": 123,
"assets": 123,
"period_month": "2023-12-25"
}
]{
"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_nav
Monthly NAV/flows series for one CNPJ, oldest first. Default window (p_to NULL) ends at the family’s latest COMPLETE period per mv_period_completeness; an explicit p_to serves the window verbatim, partial months included. Row cap: more than 1000 rows RAISES 22023 (never trimmed) unless p_after pages: ” = first page, then the last row’s period as ‘YYYY-MM-DD’. PAGING REQUIRES p_entity_type — one CNPJ can file under two families in the same month (385 do), so a bare period is unique only within one family; whole-result mode serves both and labels each row. period keeps each family’s own date convention: fi, fii and fiagro rows are dated the FIRST of the month (an fi row carries the last daily report filed in that month, so 2026-09-01 holds September’s closing NAV), fidc rows the month-END (2026-08-31), fip rows 31 December of the year; the trailing period_month is the same month as api.panel keys it (first of month), equal to period for fi, fii and fiagro. Columns are per family (fact_fund_monthly arms): fi files quota, quotaholders, inflows, redemptions; fidc and fiagro file delinquency; fii files quotaholders, monthly_yield, assets; fip files nav only — a null outside that list is not applicable, not missing (catalog().applicability). fidc delinquency is filed from 2013-01, null for a fund with no tab VI row before 2020-11 and on every row from 2020-11 (regime break; catalog().regime_breaks).
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 pages: send p_after = "" for the first page, then the key copied from the last row; a page shorter than 1000 is the last. p_after = null is whole-result mode, which is what refuses.
curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_cnpj": "<string>",
"p_from": "2019-01-01",
"p_to": null,
"p_entity_type": null,
"p_after": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav"
payload = {
"p_cnpj": "<string>",
"p_from": "2019-01-01",
"p_to": None,
"p_entity_type": None,
"p_after": 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: '2019-01-01',
p_to: null,
p_entity_type: null,
p_after: null
})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'p_cnpj' => '<string>',
'p_from' => '2019-01-01',
'p_to' => null,
'p_entity_type' => null,
'p_after' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav"
payload := strings.NewReader("{\n \"p_cnpj\": \"<string>\",\n \"p_from\": \"2019-01-01\",\n \"p_to\": null,\n \"p_entity_type\": null,\n \"p_after\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"p_cnpj\": \"<string>\",\n \"p_from\": \"2019-01-01\",\n \"p_to\": null,\n \"p_entity_type\": null,\n \"p_after\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/fund_nav")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"p_cnpj\": \"<string>\",\n \"p_from\": \"2019-01-01\",\n \"p_to\": null,\n \"p_entity_type\": null,\n \"p_after\": null\n}"
response = http.request(request)
puts response.read_body[
{
"cnpj": "<string>",
"period": "2023-12-25",
"entity_type": "<string>",
"nav": 123,
"quota": 123,
"quotaholders": 123,
"delinquency": 123,
"monthly_yield": 123,
"inflows": 123,
"redemptions": 123,
"assets": 123,
"period_month": "2023-12-25"
}
]{
"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
The publishable key (sb_publishable_…), on every request. It is NOT a JWT — sending it as Authorization: Bearer is rejected as an invalid JWT. It identifies the project, not you, and maps to the Postgres anon role.
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?