powered by
Internal helper function to download time series data from BCB SGS API. Uses httr2 for robust HTTP requests with automatic fallback strategy.
.get_sgs_series(series_id, start_date = NULL, end_date = NULL)
A data.frame with columns 'date' (Date) and 'value' (numeric).
Numeric. SGS series ID.
Start date (YYYY, YYYY-MM, or YYYY-MM-DD format).
End date (YYYY, YYYY-MM, YYYY-MM-DD format, or NULL for current date).
if (FALSE) { # interactive() # Example: download SELIC series (ID 432) df <- brfinance:::.get_sgs_series(432, "2020", "2021") head(df) tail(df) }
Run the code above in your browser using DataLab