| banxico_data | R Documentation |
Retrieve time series data from the Banco de México Sistema de Información Económica (SIE) API.
banxico_data(
series,
start_date = NULL,
end_date = NULL,
api_key = banxico_key()
)
series |
( |
start_date |
( |
end_date |
( |
api_key |
( |
The SIE API requires a free access token. Request one at
https://www.banxico.org.mx/SieAPIRest/service/v1/token and supply it via the api_key
argument or the BANXICO_KEY environment variable.
Supply both start_date and end_date to restrict the period, or neither to return the
complete history of each series. Supplying only one is an error.
A data.table::data.table() with columns date, key, and value.
https://www.banxico.org.mx/SieAPIRest/service/v1/
Other data:
bbk_data(),
bbk_series(),
bcb_data(),
bcb_expectations(),
bcb_fx_rates(),
bcb_inflation(),
bcb_selic(),
bcb_top5(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boi_data(),
boj_data(),
cnb_czeonia(),
cnb_data(),
cnb_fx_other_rates(),
cnb_fx_rates(),
cnb_pribor(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
# fetch the FIX peso/US dollar exchange rate
banxico_data("SF43718", start_date = "2024-01-01", end_date = "2024-01-31")
# fetch multiple series at once
banxico_data(c("SF43718", "SF60653"), start_date = "2024-01-01", end_date = "2024-01-31")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.