curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/quote_history \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_ticker": "<string>",
"p_from": "2023-12-25",
"p_to": "2023-12-25",
"p_board": null,
"p_after": null,
"p_fields": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/quote_history"
payload = {
"p_ticker": "<string>",
"p_from": "2023-12-25",
"p_to": "2023-12-25",
"p_board": None,
"p_after": None,
"p_fields": 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: '2023-12-25',
p_to: '2023-12-25',
p_board: null,
p_after: null,
p_fields: null
})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/quote_history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"ticker": "<string>",
"trade_date": "2023-12-25",
"close_adj": 123,
"close": 123,
"open": 123,
"high": 123,
"low": 123,
"average": 123,
"bid": 123,
"ask": 123,
"close_unit": 123,
"trades": 123,
"quantity": 123,
"volume": 123,
"quotation_factor": 123,
"board": "<string>",
"isin": "<string>",
"short_name": "<string>",
"spec": "<string>",
"currency": "<string>",
"asset_class": "<string>",
"source": "<string>",
"coverage_start": "2023-12-25",
"coverage_end": "2023-12-25",
"prior_no_trade_sessions": 123,
"events_proven_at": "<string>",
"data_revision": "<string>",
"close_total_return": 123,
"close_total_return_null_reason": "<string>",
"market": "<string>",
"term_days": "<string>",
"contract_price": 123,
"contract_expiry": "2023-12-25",
"contract_correction": "<string>",
"contract_points": 123,
"contract_points_raw": "<string>",
"distribution_number": "<string>",
"fetched_at": "<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>"
}quote_history
curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/quote_history \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_ticker": "<string>",
"p_from": "2023-12-25",
"p_to": "2023-12-25",
"p_board": null,
"p_after": null,
"p_fields": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/quote_history"
payload = {
"p_ticker": "<string>",
"p_from": "2023-12-25",
"p_to": "2023-12-25",
"p_board": None,
"p_after": None,
"p_fields": 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: '2023-12-25',
p_to: '2023-12-25',
p_board: null,
p_after: null,
p_fields: null
})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/quote_history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"ticker": "<string>",
"trade_date": "2023-12-25",
"close_adj": 123,
"close": 123,
"open": 123,
"high": 123,
"low": 123,
"average": 123,
"bid": 123,
"ask": 123,
"close_unit": 123,
"trades": 123,
"quantity": 123,
"volume": 123,
"quotation_factor": 123,
"board": "<string>",
"isin": "<string>",
"short_name": "<string>",
"spec": "<string>",
"currency": "<string>",
"asset_class": "<string>",
"source": "<string>",
"coverage_start": "2023-12-25",
"coverage_end": "2023-12-25",
"prior_no_trade_sessions": 123,
"events_proven_at": "<string>",
"data_revision": "<string>",
"close_total_return": 123,
"close_total_return_null_reason": "<string>",
"market": "<string>",
"term_days": "<string>",
"contract_price": 123,
"contract_expiry": "2023-12-25",
"contract_correction": "<string>",
"contract_points": 123,
"contract_points_raw": "<string>",
"distribution_number": "<string>",
"fetched_at": "<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
Fields to return; null or omitted = ticker, trade_date, close_adj. ticker and trade_date are in every row.
ticker, trade_date, close_adj, close, open, high, low, average, bid, ask, close_unit, trades, quantity, volume, quotation_factor, board, isin, short_name, spec, currency, asset_class, source, coverage_start, coverage_end, prior_no_trade_sessions, events_proven_at, data_revision, close_total_return, close_total_return_null_reason, market, term_days, contract_price, contract_expiry, contract_correction, contract_points, contract_points_raw, distribution_number, fetched_at Response
The result set, oldest first. An unknown ticker, or a window outside its coverage, is refused (22023), never an empty or guessed series.
Close per single share, backward-adjusted for splits (DESDOBRAMENTO), groupings (GRUPAMENTO) and bonus shares (BONIFICACAO) and anchored to the instrument's latest session; rounded to 6 decimal places. No dividend, JCP or subscription-right adjustment. Shares and units only. Null only when the session has no close; a window it cannot adjust is refused, never filled with the raw close.
close_adj with cash distributions reinvested at the ex-date close (#418): divided by the product of (1 + cash / ex-session close) over later distributions (DIVIDENDO, JRS CAP PROPRIO gross of tax, RENDIMENTO, REST CAP DIN from B3's full history, ISIN proven against the tape). 6 decimal places. NULL, with close_total_return_null_reason, where it cannot be valued.
Was this page helpful?