curl --request POST \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/future_curve \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_root": "DI1",
"p_trade_date": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/future_curve"
payload = {
"p_root": "DI1",
"p_trade_date": 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_root: 'DI1', p_trade_date: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/future_curve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"trade_date": "2023-12-25",
"ticker": "<string>",
"contract_month": "2023-12-25",
"settlement_rate": 123,
"settlement_price": 123,
"prev_settlement_rate": 123,
"open_interest": 123,
"contracts": 123,
"trades": 123,
"notional_brl": 123,
"open_px": 123,
"low_px": 123,
"high_px": 123,
"avg_px": 123,
"close_px": 123,
"settlement_status": "<string>",
"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>"
}future_curve
Every outright futures contract of one root on one B3 session (B3 Price Report BVBG.086.01, b3_futures_settlement), nearest maturity first, as published. p_root is DI1, DOL or WDO; any other root RAISES 22023 listing the three. The columns are the same for every root but do not mean the same thing. DI1 (QUOTED IN RATE): settlement_rate is % a.a. on 252 business days, settlement_price the PU (R$; 100,000 at maturity), prev_settlement_rate the previous session’s rate, and open/low/high/avg/close are RATES (the low rate is the high price). DOL (dollar future, USD 50,000 per contract) and WDO (mini dollar future, USD 10,000): QUOTED IN PRICE, BRL per USD 1,000 (B3 contract specification, read 2026-10-21; they mature on the first business day of the contract month, every month). Their open/low/high/avg/close_px and settlement_price are that price as the Price Report prints it, no conversion; settlement_rate and prev_settlement_rate are NULL where B3 prints none, which is the dollar futures’ case. Every root: open_interest, contracts traded, trades, notional_brl and settlement_status as published. contract_month is the one derived column: the first day of the month the ticker names, read with B3’s month letters (F = January … Z = December). p_trade_date NULL = the newest session held for that root, and a date with no session (a holiday, or before 2018-01-02, when B3’s Price Report history starts) returns no rows. More than 1000 rows RAISES 22023 (never trimmed); one session holds about 50 DI1 contracts and fewer dollar ones.
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/future_curve \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"p_root": "DI1",
"p_trade_date": null
}
'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/future_curve"
payload = {
"p_root": "DI1",
"p_trade_date": 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_root: 'DI1', p_trade_date: null})
};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1/rpc/future_curve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"trade_date": "2023-12-25",
"ticker": "<string>",
"contract_month": "2023-12-25",
"settlement_rate": 123,
"settlement_price": 123,
"prev_settlement_rate": 123,
"open_interest": 123,
"contracts": 123,
"trades": 123,
"notional_brl": 123,
"open_px": 123,
"low_px": 123,
"high_px": 123,
"avg_px": 123,
"close_px": 123,
"settlement_status": "<string>",
"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, nearest maturity first. An unknown id is an empty array, not a 404 and never a guessed value.
Was this page helpful?