Tesouro Direto: rates, prices and the yield curve
The daily rates and prices of every Tesouro Direto bond, kept as the National Treasury publishes them, with no recalculation. It is the public reading of what the market charges per term (the government bond yield curve), while B3 does not release the interest rate futures. The page is /tesouro; the JSON/CSV route is /tesouro/taxas.
Why it lives in the Macro section
Every company number in this database is recomputable from the CVM filing. The secondary market rate of a
government bond is not: it is an aggregate compiled by the Treasury that nobody rebuilds from a public document. You
accept the official figure or you do not use it. So it has its own table (tesouro_taxa) and lives in the Macro
section, with the source and the licence written on every page and every response.
Source and licence
- Source: Tesouro Transparente (National Treasury Secretariat), open data set Taxas dos Títulos Ofertados pelo
Tesouro Direto, file
PrecoTaxaTesouroDireto.csv. Address: https://www.tesourotransparente.gov.br/ckan/dataset/df56aa42-484a-4a59-8184-7676580c81e3. - Licence: the portal declares ODbL 1.0 (Open Data Commons Open Database License) in the data set metadata, checked on 31 October 2026. It is the same as the Central Bank and CVM: free use, including commercial, citing the National Treasury as the source and sharing the derived database on the same terms.
- Coverage: the public file starts on 31 December 2004 and runs to the last business day. There is no earlier data in the file.
What each column is
| Source column | What we keep |
|---|---|
| Tipo Titulo | the bond name (Tesouro Selic, Prefixado, IPCA+, ...) |
| Data Vencimento | the maturity |
| Data Base | the day the rate refers to |
| Taxa Compra Manha / Taxa Venda Manha | the indicative morning rates, % a year |
| PU Compra Manha / PU Venda Manha / PU Base Manha | the unit prices, in reais |
Buy and sell are the source labels, from the investor's point of view: buy is the side where he buys from the Treasury (lower rate, higher price); sell is the side where he sells back.
How to read each bond's rate
- Prefixado (fixed rate): nominal rate a year, fixed to maturity.
- IPCA+, Renda+ and Educa+: real rate, above IPCA inflation.
- Selic: the premium or discount over the Selic, which is why it sits near zero.
- A nominal rate and a real rate are not directly comparable. That is why the page has two curve charts, one for the fixed-rate bonds and one for the IPCA+ bonds, not one.
The curve chart
SVG generated on the server (the site runs no script in the browser). Each point is a maturity: the horizontal axis is the term in years from the base date to maturity (calendar days divided by 365.25 — the only calculation of ours on the page) and the vertical axis is the source buy rate. Renda+ and Educa+ (maturities from 2030 to 2084) and Tesouro Selic stay in the table only.
How the collection works
- Every week, in the database rebuild, the file is downloaded whole (one request, with the robot identified).
- Every night, the same file, but only the last 45 days are stored.
- Isolated failure. Source down, a header different from the one checked, or a number outside the plausible range: the batch is not stored and the history stays as it was. Nothing is deleted; the from-scratch rebuild inherits from the previous database what the source did not bring.
- Plausible range: rate between -10% and 60% a year; price between R$ 0 and R$ 100 thousand. Outside it is a misreading (swapped comma, shifted column) and the whole batch is refused.
- In /saude, the
tesouroblock shows the latest base date, how many days ago it was and the result of the last collection (alarm after 7 days).
What the page does NOT do
- It does not recommend a bond, a term or a moment. It is the source figure, the definition of each bond and nothing more.
- It has no closing rate or intraday rate: the file carries the indicative morning rates.
- It does not replace B3 interest rate futures (DI), which are of a different nature; it is what the public can check today.
Access
- /tesouro — the page, open, in Portuguese and English.
/tesouro/taxas— JSON (or?formato=csv). With no parameter: every bond on the latest base date.titulo(selic, prefixado, prefixado-juros, ipca, ipca-juros, renda-mais, educa-mais, igpm-juros) filters the family;data=YYYY-MM-DDasks for another base date;titulo+vencimento=YYYY-MM-DDreturns the daily series of one bond, cut bydeandate. Open, no key. Every response carries thefonte, the licence and thecitacao.- MCP connector tool:
tesouro_direto.