curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/dividends \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_ticker": "<string>",
"p_from": null,
"p_to": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/dividends"
payload = {
"p_ticker": "<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_ticker: '<string>', p_from: null, p_to: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/dividends', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"ticker": "<string>",
"isin": "<string>",
"company": "<string>",
"share_class": "<string>",
"action": "<string>",
"approved_on": "2023-12-25",
"last_date_with": "2023-12-25",
"ex_date": "2023-12-25",
"payment_date": "2023-12-25",
"value_per_share": 123,
"close_prior_ex": 123,
"yield_pct": 123,
"installment": 123,
"source": "<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>"
}dividends
Cash distributions (DIVIDENDO, JRS CAP PROPRIO gross of withholding tax, RENDIMENTO, …) of one B3 ticker, newest last_date_with first. source b3_cash_history: B3’s full history (1995 on) for the company and the ticker’s share class (first word of ESPECI), with approval date, last date with rights, value per share, B3’s pre-ex close and yield; the company is matched by ticker prefix and the CNPJ CVM’s FCA map publishes, never by name. source b3_supplement: an event only B3’s ~12-month supplement lists (recent declarations, most FIIs). ex_date is the first B3 cash session after last_date_with on the tape (NULL before 2019 and until that session prints). payment_date is B3’s paymentDate from the supplement (2025 on), matched on ISIN, action, date and amount; NULL when B3 published none or the match is ambiguous, never guessed. installment numbers identical installment rows. p_from / p_to bound last_date_with (NULL = unbounded). A ticker with no cash print returns no rows. 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.
curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/dividends \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_ticker": "<string>",
"p_from": null,
"p_to": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/dividends"
payload = {
"p_ticker": "<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_ticker: '<string>', p_from: null, p_to: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/dividends', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"ticker": "<string>",
"isin": "<string>",
"company": "<string>",
"share_class": "<string>",
"action": "<string>",
"approved_on": "2023-12-25",
"last_date_with": "2023-12-25",
"ex_date": "2023-12-25",
"payment_date": "2023-12-25",
"value_per_share": 123,
"close_prior_ex": 123,
"yield_pct": 123,
"installment": 123,
"source": "<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 last_date_with first. An unknown id is an empty array, not a 404 and never a guessed value.
Was this page helpful?