Changelog
Source:NEWS.md
Version 1.7.2.9000 (development version)
- hardened
td_get2(): downloaded/local CSV files are now validated (header and content) before replacing the cache, so HTML error pages, rate-limit responses and truncated downloads raise a clear error instead of silently returning (and caching) an empty data set -
td_get2()cache is now tagged with its data source and format version; a cache produced from a differentdataset_urlis no longer reused -
td_get2()reuses an already validated CSV from the same day instead of downloading it again, and falls back to the cached data (instead of erroring) whenforce_download = TRUEfails -
td_get2()now retries downloads (3 attempts with backoff) and sends a package user agent, mitigating intermittent 429/connection reset errors from the portal -
td_get2()no longer silently falls back to the default CKAN resource when an arbitrarydataset_urlcannot be resolved; the fallback is restricted to the Tesouro Transparente portal and emits a warning -
td_get2()asset code validation and filtering now share a single alias map, fixing the misleading list of valid codes in the error message and removing dead filtering code -
td_get2()validatesfirst_year/last_yearand warns when the filters return no rows - fixed
td_get()documentation pointing to an unreleasedtd_get2() - removed the optional MCP server (
mcp_server(),mcp_tools(), and the bundledinst/mcp/tools.Rdefinitions) along with themcptools,ellmer, andjsonlitesuggested dependencies - all internet-dependent tests now skip on CRAN and when offline (via
testthat::skip_if_offline()andtestthat::skip_on_cran()), while still running undercovr
Version 1.7.2 (2026-10-13)
- added an optional Model Context Protocol (MCP) server that exposes a curated set of package functions (
td_get2(),td_get_current(),get_yield_curve(),get_asset_info(),get_td_names()) as LLM-callable tools viamcp_server()andmcp_tools(); requires the suggestedmcptools,ellmer, andjsonlitepackages
Version 1.7.1 (2026-09-10)
CRAN release: 2026-09-10
- added
td_get2()to retrieve bond data from the Tesouro Transparente CKAN portal (https://www.tesourotransparente.gov.br/ckan/dataset/taxas-dos-titulos-ofertados-pelo-tesouro-direto) with columns matchingtd_get() - updated
td_get_current()to usetd_get2()and fetch live daily prices without deprecation warnings - fixed
get_yield_curve()(andget.yield.curve()) on Windows by specifyingLatin1encoding when parsing Anbima HTML tables, adding browser request headers, an SSL certificate fallback, and sanitized date extraction - deprecated
td_get()usinglifecycle::deprecate_warn()due to the closure of the Tesouro Direto data application in August 2026; users should usetd_get2()
Version 1.7.0 (2026-08-29)
CRAN release: 2026-08-29
- restored and fixed
td_get_current()to reliably fetch daily current prices and yields from Tesouro Direto using current-year asset files - added
get_asset_info()helper function providing bond metadata (indexer, coupon structure, descriptions) - added visualization functions
plot_yield_curve()andplot_td_series()built onggplot2 - added
.rdsfile caching for parsed Excel files to accelerate data loading on repeat reads - added option for user-persistent caching in
get_cache_folder()viatools::R_user_diroroptions(GetTDData.persistent_cache = TRUE) - standardized all function outputs (
td_get(),get_yield_curve(),td_get_current()) to returntibbledata frames (tbl_df) - updated
get_td_names()with support forNTN-B1(covering RendA+ and Educa+ instruments) and optionalonlineCDN check - fixed dead
return(TRUE)statement intd_get() - guarded
covr::in_covr()checks in test suite to prevent test failures whencovrpackage is missing
Version 1.6.0 (2026-06-04)
CRAN release: 2026-06-04
- implemented parallel file downloading using
curl::multi_downloadto speed up asset fetching - implemented safe parallel sheet parsing using socket clusters (
makeClusterandparLapply), improving read speed and preventing C++ fork deadlocks - optimized sheet-reading loop by accumulating data frames in a list and calling
bind_rowsonce - vectorized date parsing in
td_getto avoid row-by-rowsapplycalls - renamed
get.yield.curve()toget_yield_curve()and provided a deprecated dot-case wrapper for backward compatibility - removed unused package dependency
purrrfrom DESCRIPTION Imports - removed unused package dependency
lubridatefrom DESCRIPTION Suggests and replaced with base R equivalents in tests - converted all internal dot-case variables and column names (e.g.
n.biz.days,ref.date,current.date,possible.names) to snake_case - fixed and corrected roxygen2 documentation inconsistency details for parameters and return values
Version 1.5.7 (2025-05-19)
CRAN release: 2025-05-19
- removed use of pkg humanize (will be removed from cran)
Version 1.5.6 (2024-08-20)
CRAN release: 2024-08-20
- fixed bug at td_get_current(), the api endpoint is no longer available.
Version 1.5.5 (2024-04-11)
CRAN release: 2024-04-11
- added td_get_current(), for fetching current TD prices from the website.
Version 1.5.4 (2023-05-15)
CRAN release: 2023-05-15
- fixed issue with CRAN check. The vignette could fail in CHECK. The vignettes were deleted and the content is now part of Readme.Rmd file, which compiles locally.
- set dependency for R > 4.1.0
Version 1.5.3 (2023-01-24)
- deprecated functions download.TD.data() and read.TD.files(). Both are replaced by td_get()
Version 1.5.2 (2023-01-01)
CRAN release: 2023-01-06
- it now fails gracefuly when download of files fails.
Version 1.5.1 (2022-05-11)
CRAN release: 2022-05-11
- implemented change for bizdays::holidaysANBIMA (see issue 10)
Version 1.5.0 (2022-04-28)
- improved github actions by adding codecov, pkgdown and LICENSE
- added new tests and functions
- removed arguments “maturity” and “asset.codes” from
read.TD.filesfunction
Version 1.4.4 (2022-03-02)
CRAN release: 2022-03-02
- Fixed issue in cran check for oldrel (use of new pipeline operator, which is not available prior to R < 4.1)
Version 1.4.1 (2019-07-11)
CRAN release: 2019-07-15
- Fixed bug in yield function (anbima site is down…). Need to find an alternative.
Version 1.4 (2019-04-02)
CRAN release: 2019-04-02
- Fixed bug in name importing of spreadsheets
- Prices and yield are now cleaned (no values equal to zero)
Version 1.3 (2017-09-14)
CRAN release: 2017-09-14
- Added function for downloading current yield curve from Anbima
- Fixed typos in vignettes
- dev version now in github
- fixed bug for names of NTN-Principal
Version 1.2.5 (2016-11-07)
CRAN release: 2016-11-08
- Added the maturities of the instruments as an extra column in the dataframe
Version 1.2.4 (2016-08-15)
CRAN release: 2016-08-16
- The package CHECK process no longer depends on the avaibility of Tesouro Direto website. All needed files are now local
Version 1.2.3 (2016-05-22)
CRAN release: 2016-05-24
- Fixed bug in html download. Now using a new function and a new algorithm to try the download 10 times before throwing an error
Version 1.2.2 (2016-05-22)
CRAN release: 2016-05-22
- The html structure of the Tesouro Website has changed and that resulted in CHECK errors in the package. This update fixed it.
- Fixed TD names in read function (TD website is a mess!)
- Now also using input asset.codes in read function