curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/curves \
--header 'Authorization: Bearer <token>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/curves"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/curves', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>",
"source": "<string>",
"data_through": "2023-12-25",
"coverage_dataset": "<string>",
"data_through_error": "<string>",
"tier": "anonymous",
"tier_cap_reached": true
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"reason": "row_cap",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Curves
What does the rate curve look like? B3 reference curves, their history and vertices.
Example: /v2/curves?curve=PRE
Kinds:
snapshot: api.curve: one curve on one session, shortest vertex first, fixed and moving vertices with rate_basis.history: api.curve_history: one fixed vertex through time, oldest first. Refuses above 1000 rows: narrow from/to.vertices: api.reference_rate (a GET view): one curve’s vertices on one session (business_days, calendar_days, rate_pct as published). Paged with order + limit + offset; the default session is pinned in the cursor.treasury: api.treasury_direct: Tesouro Direto posted morning buy and sell rates (% a year, as published) and PU per title, newest base date first. Quotes, not trades; a NULL price is a side not on sale. Every row carries source (Tesouro Nacional) and licence (ODbL-1.0): credit Tesouro Nacional when you reuse it. About 60 titles a base date.
With no from, a dated kind reads the last 12 months to to.
PRE and DPL are % a.a. on 252 business days; DOC is % a.a. linear on 360 calendar days, so its vertices under about 30 calendar days are not a rate level. rate_basis rides on every snapshot and history row.
Past the last maturity of the anchoring contract (DI1, DDI, DAP) B3 extrapolates: the long vertices are not prices. Nothing is interpolated: a tenor that is not one of B3’s fixed vertices is refused with the list.
kind treasury is Tesouro Nacional open data under the ODbL 1.0 licence, the one resource that names its source: credit Tesouro Nacional, and offer a database derived from it under the same licence. The rates are the platform’s posted retail quotes, not trades.
GET /v2/curves?help describes the main parameters, ?help=all adds the hidden ones.
curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/curves \
--header 'Authorization: Bearer <token>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/curves"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/curves', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>",
"source": "<string>",
"data_through": "2023-12-25",
"coverage_dataset": "<string>",
"data_through_error": "<string>",
"tier": "anonymous",
"tier_cap_reached": true
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"reason": "row_cap",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Authorizations
Query Parameters
snapshot: one curve on one session, every vertex, with its rate basis. history: one fixed vertex through time. vertices: the raw reference-rate rows (api.reference_rate) of one curve on one session. treasury: Tesouro Direto posted rates and prices per title, newest base date first (Tesouro Nacional, ODbL). Default: snapshot.
snapshot, history, vertices, treasury Was this page helpful?