| Title: | Client for Central Bank APIs |
| Version: | 0.10.0 |
| Description: | A client for retrieving data and metadata from central bank APIs including 'Banco de España' (BdE), 'Banco de Portugal' (BdP), 'Bank for International Settlements' (BIS), 'Bank of Canada' (BoC), 'Bank of England' (BoE), 'Bank of Japan' (BoJ), 'Banque de France' (BdF), 'Deutsche Bundesbank' (BBk), 'European Central Bank' (ECB), 'National Bank of Poland' (NBP), 'Norges Bank' (NoB), 'Oesterreichische Nationalbank' (OeNB), 'Sveriges Riksbank' (SRb), and 'Swiss National Bank' (SNB). |
| License: | MIT + file LICENSE |
| URL: | https://m-muecke.github.io/bbk/, https://github.com/m-muecke/bbk |
| BugReports: | https://github.com/m-muecke/bbk/issues |
| Depends: | R (≥ 4.1.0) |
| Imports: | checkmate, curl, data.table (≥ 1.17.0), httr2 (≥ 1.0.0), jsonlite, stats, utils, xml2 |
| Suggests: | ggplot2, scales, testthat (≥ 3.3.0) |
| Config/roxygen2/markdown: | TRUE |
| Config/roxygen2/version: | 8.0.0 |
| Config/testthat/edition: | 3 |
| Encoding: | UTF-8 |
| NeedsCompilation: | yes |
| Packaged: | 2026-05-15 18:49:26 UTC; mmuecke |
| Author: | Maximilian Mücke |
| Maintainer: | Maximilian Mücke <muecke.maximilian@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-05-16 11:30:02 UTC |
bbk: Client for Central Bank APIs
Description
A client for retrieving data and metadata from central bank APIs including 'Banco de España' (BdE), 'Banco de Portugal' (BdP), 'Bank for International Settlements' (BIS), 'Bank of Canada' (BoC), 'Bank of England' (BoE), 'Bank of Japan' (BoJ), 'Banque de France' (BdF), 'Deutsche Bundesbank' (BBk), 'European Central Bank' (ECB), 'National Bank of Poland' (NBP), 'Norges Bank' (NoB), 'Oesterreichische Nationalbank' (OeNB), 'Sveriges Riksbank' (SRb), and 'Swiss National Bank' (SNB).
Author(s)
Maintainer: Maximilian Mücke muecke.maximilian@gmail.com (ORCID)
Authors:
Maximilian Mücke muecke.maximilian@gmail.com (ORCID)
See Also
Useful links:
Report bugs at https://github.com/m-muecke/bbk/issues
Fetch Deutsche Bundesbank (BBk) data
Description
Retrieve time series data from the Bundesbank SDMX Web Service.
Usage
bbk_data(
flow,
key = NULL,
start_period = NULL,
end_period = NULL,
first_n = NULL,
last_n = NULL,
updated_after = NULL
)
Arguments
flow |
( |
key |
( |
start_period |
(
If |
end_period |
( |
first_n |
( |
last_n |
( |
updated_after |
( |
Value
A data.table::data.table() with the requested data.
Source
See Also
Other data:
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# fetch all data for a given flow and key
data <- bbk_data("BBSIS", "D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A")
head(data)
# fetch data for multiple keys
data <- bbk_data("BBEX3", c("M.ISK.EUR", "USD.CA.AC.A01"))
head(data)
# specified period (start date-end date) for daily data
data <- bbk_data(
"BBSIS", "D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A",
start_period = "2020-01-01",
end_period = "2020-08-01"
)
head(data)
# or only specify the start date
data <- bbk_data(
"BBSIS", "D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A",
start_period = "2024-04-01"
)
head(data)
Fetch Deutsche Bundesbank (BBk) dimensions
Description
Retrieve the dimension structure for a given dataflow from the Bundesbank SDMX Web Service.
Usage
bbk_dimension(id)
Arguments
id |
( |
Value
A data.table::data.table() with columns:
id |
The dimension id (e.g., |
position |
The position of the dimension in the series key |
codelist |
The id of the associated codelist |
Source
See Also
Other metadata:
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bbk_dimension("BBK_ERX")
Fetch Deutsche Bundesbank (BBk) metadata
Description
Retrieve metadata from the Bundesbank time series database via the SDMX Web Service.
Usage
bbk_metadata(type, id = NULL, lang = "en")
Arguments
type |
( |
id |
( |
lang |
( |
Value
A data.table::data.table() with the requested metadata.
The columns are:
id |
The id of the metadata |
name |
The name of the metadata |
Source
See Also
Other metadata:
bbk_dimension(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bbk_metadata("datastructure")
bbk_metadata("dataflow", "BBSIS")
bbk_metadata("codelist", "CL_BBK_ACIP_ASSET_LIABILITY")
bbk_metadata("concept", "CS_BBK_BSPL")
Fetch the Deutsche Bundesbank (BBk) series
Description
Retrieve a single series by its key via the Bundesbank SDMX Web Service.
Usage
bbk_series(key)
Arguments
key |
( |
Value
A data.table::data.table() with the requested data.
Source
See Also
bbk_data() for an endpoint with more options.
Other data:
bbk_data(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
bbk_series("BBEX3.M.DKK.EUR.BB.AC.A01")
bbk_series("BBAF3.Q.F41.S121.DE.S1.W0.LE.N._X.B")
bbk_series("BBBK11.D.TTA000")
Fetch Banco de España (BdE) data
Description
Retrieve time series data from the BdE statistics API.
Usage
bde_data(key, time_range = NULL, lang = "en")
Arguments
key |
( |
time_range |
(
If |
lang |
( |
Details
You can search for the series codes in the BIEST application or in the tables published by the Banco de España.
Value
A data.table::data.table() with the requested data.
Source
https://www.bde.es/webbe/en/estadisticas/recursos/api-estadisticas-bde.html
See Also
Other data:
bbk_data(),
bbk_series(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
bde_data("D_1NBAF472", time_range = "30M")
bde_data(c("DTNPDE2010_P0000P_PS_APU", "DTNSEC2010_S0000P_APU_SUMAMOVIL"), time_range = "MAX")
bde_data("DEEQ.N.ES.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL", time_range = 2024)
Fetch latest Banco de España (BdE) data
Description
Retrieve the most recently published value for one or more series from the BdE statistics API.
Usage
bde_latest(key, lang = "en")
Arguments
key |
( |
lang |
( |
Value
A data.table::data.table() with the latest observation per series.
Source
https://www.bde.es/webbe/en/estadisticas/recursos/api-estadisticas-bde.html
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
bde_latest("D_1NBAF472")
bde_latest(c("D_1NBAF472", "DTNPDE2010_P0000P_PS_APU"))
Fetch Banque de France (BdF) codelists
Description
Fetch Banque de France (BdF) codelists
Usage
bdf_codelist(..., lang = "en")
Arguments
... |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
Source
https://webstat.banque-france.fr/en/pages/guide-migration-api/
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
## Not run:
bdf_codelist()
# filter for a specific codelist
bdf_codelist(where = "codelist_id = 'CL_FREQ'")
## End(Not run)
Fetch Banque de France (BdF) data
Description
Retrieve time series data from the BdF Webstat API.
Usage
bdf_data(
...,
key = NULL,
start_date = NULL,
end_date = NULL,
lang = "en",
api_key = bdf_key()
)
Arguments
... |
( |
key |
( |
start_date |
( |
end_date |
( |
lang |
( |
api_key |
( |
Value
A data.table::data.table() with the requested data.
Source
https://webstat.banque-france.fr/en/pages/guide-migration-api/
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
## Not run:
bdf_data(key = "CONJ2.M.R24.T.SM.0RG24.EFTPM100.10")
# inflation rate
bdf_data(key = "ICP.M.FR.N.000000.4.ANR")
# or with a date filter
bdf_data(key = "ICP.M.FR.N.000000.4.ANR", start_date = "2025-01-01", end_date = "2025-06-30")
# advanced filter with where clause
bdf_data(key = "ICP.M.FR.N.000000.4.ANR", where = "time_period_start >= date'2025-01-01'")
## End(Not run)
Fetch Banque de France (BdF) datasets
Description
Fetch Banque de France (BdF) datasets
Usage
bdf_dataset(..., lang = "en")
Arguments
... |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
Source
https://webstat.banque-france.fr/en/pages/guide-migration-api/
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
## Not run:
bdf_dataset()
# structure of a dataset
bdf_dataset(where = "dataset_id = 'CONJ2'")
## End(Not run)
Fetch Banco de Portugal (BdP) data
Description
Retrieve time series data from the BPstat API.
Usage
bdp_data(
domain_id,
dataset_id,
series_ids = NULL,
start_date = NULL,
end_date = NULL,
last_n = NULL,
updated_after = NULL,
lang = "en"
)
Arguments
domain_id |
( |
dataset_id |
( |
series_ids |
( |
start_date |
( |
end_date |
( |
last_n |
( |
updated_after |
( |
lang |
( |
Details
The BPstat API uses a two-step workflow: first look up the series metadata with
bdp_series() to find the domain_id and dataset_id, then use those to fetch the actual
observations.
You can browse available series at the BPstat portal.
Value
A data.table::data.table() with the requested data.
Source
https://bpstat.bportugal.pt/data/docs
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# Portuguese GDP (annual, current prices)
bdp_data(54L, "ce3e4e50cda325537eff729ef64037cd", series_ids = 12518356L)
Fetch Banco de Portugal (BdP) datasets
Description
Retrieve the list of datasets for a given domain from the BPstat API.
Usage
bdp_dataset(domain_id, lang = "en")
Arguments
domain_id |
( |
lang |
( |
Value
A data.table::data.table() with available datasets.
Source
https://bpstat.bportugal.pt/data/docs
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bdp_dataset(54L)
Fetch Banco de Portugal (BdP) dimensions
Description
Retrieve the list of dimensions for a given domain, or the categories within a single dimension.
Usage
bdp_dimension(domain_id, dimension_id = NULL, lang = "en")
Arguments
domain_id |
( |
dimension_id |
( |
lang |
( |
Value
A data.table::data.table() with dimensions or categories.
Source
https://bpstat.bportugal.pt/data/docs
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bdp_dimension(54L)
Fetch Banco de Portugal (BdP) domains
Description
Retrieve the list of available statistical domains from the BPstat API, or details for a single domain.
Usage
bdp_domain(domain_id = NULL, lang = "en")
Arguments
domain_id |
( |
lang |
( |
Value
A data.table::data.table() with available domains.
Source
https://bpstat.bportugal.pt/data/docs
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bdp_domain()
Fetch Banco de Portugal (BdP) series metadata
Description
Retrieve metadata for one or more series from the BPstat API. This is useful to discover the
domain_id and dataset_id needed for bdp_data().
Usage
bdp_series(series_ids, lang = "en")
Arguments
series_ids |
( |
lang |
( |
Value
A data.table::data.table() with series metadata including domain_id and
dataset_id.
Source
https://bpstat.bportugal.pt/data/docs
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bdp_series(12518356L)
Fetch Bank for International Settlements (BIS) data
Description
Retrieve time series data from the BIS SDMX Web Service.
Usage
bis_data(
flow,
key = NULL,
start_period = NULL,
end_period = NULL,
first_n = NULL,
last_n = NULL,
updated_after = NULL
)
Arguments
flow |
( |
key |
( |
start_period |
(
If |
end_period |
( |
first_n |
( |
last_n |
( |
updated_after |
( |
Value
A data.table::data.table() with the requested data.
Source
https://stats.bis.org/api-doc/v1/
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# fetch Swiss central bank policy rate
bis_data("WS_CBPOL", "M.CH", last_n = 5L)
# fetch effective exchange rates
bis_data("WS_EER", "M.N.B.CH", start_period = "2020-01")
Fetch Bank for International Settlements (BIS) dimensions
Description
Retrieve the dimension structure for a given dataflow from the BIS SDMX Web Service.
Usage
bis_dimension(id)
Arguments
id |
( |
Value
A data.table::data.table() with columns:
id |
The dimension id (e.g., |
position |
The position of the dimension in the series key |
codelist |
The id of the associated codelist (e.g., |
Source
https://stats.bis.org/api-doc/v1/
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bis_dimension("BIS_CBPOL")
Fetch Bank for International Settlements (BIS) metadata
Description
Retrieve metadata from the BIS SDMX Web Service.
Usage
bis_metadata(type, id = NULL)
Arguments
type |
( |
id |
( |
Value
A data.table::data.table() with the requested metadata.
Source
https://stats.bis.org/api-doc/v1/
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
bis_metadata("dataflow")
bis_metadata("datastructure", "BIS_CBPOL")
bis_metadata("codelist", "CL_FREQ")
Fetch Bank of Canada (BoC) available series or group
Description
Access all available series or groups from the Bank of Canada Valet API.
Usage
boc_catalog(type = "groups")
Arguments
type |
( |
Value
A data.table::data.table() with the requested data.
Source
https://www.bankofcanada.ca/valet/docs
Examples
## Not run:
catalog <- boc_catalog()
head(catalog)
# filter for effective exchange rate series
dt <- catalog[grepl("CEER", label)]
head(dt)
## End(Not run)
Fetch Bank of Canada (BoC) data
Description
Retrieve time series data from the Bank of Canada Valet API.
Usage
boc_data(
group_name = NULL,
series_name = NULL,
start_date = NULL,
end_date = NULL
)
Arguments
group_name |
( |
series_name |
( |
start_date |
( |
end_date |
( |
Value
A data.table::data.table() with the requested data.
Source
https://www.bankofcanada.ca/valet/docs
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
## Not run:
# fetch all data for a single group
dt <- boc_data(group_name = "FX_RATES_DAILY")
head(dt)
# or for multiple series ids
dt <- boc_data(
series_name = c("FXUSDCAD", "FXEURCAD"),
start_date = "2023-01-23",
end_date = "2023-07-19"
)
head(dt)
## End(Not run)
Fetch Bank of Canada foreign exchange rates
Description
Fetch the latest or historical foreign exchange reference rates from the Bank of Canada (BoC).
Usage
boc_fx_rates(start_date = NULL, end_date = NULL, limit = NULL, skip = NULL)
Arguments
start_date |
( |
end_date |
( |
limit |
( |
skip |
( |
Details
The recorded rates indicate the number of Canadian dollars required to buy a single unit of the foreign currency. New rates are released by the Bank of Canada (BoC) daily at 4:30 pm. The Canada Border Services (CBSA) retrieves these updates between 4:30 pm and 5 pm ET.
BoC provides 23 foreign exchange rates. All other rates are maintained by the CBSA.
Exchange rates from the BoC are updated daily in the system while other exchange rates are updated by the CBSA at set intervals. The updated rates are available for retrieval between 7 pm and 11:59 pm ET.
As BoC publishes exchange rates every business day, it is recommended that exchange rate data be retrieved on a daily basis. This retrieval should occur after 7 pm ET to ensure retrieval of the latest updates.
Value
A data.table::data.table() with the exchange rates.
Source
https://www.cbsa-asfc.gc.ca/eservices/api/er-tc-api-eng.html
Examples
# fetch latest exchange rates
boc_fx_rates()
# fetch historical exchange rates
boc_fx_rates(start_date = "2021-10-22", end_date = "2021-10-23", limit = 10, skip = 2)
Fetch Bank of Canada (BoC) metadata (details)
Description
Fetch Bank of Canada (BoC) metadata (details)
Usage
boc_metadata(group_name = NULL, series_name = NULL)
Arguments
group_name |
( |
series_name |
( |
Value
A data.table::data.table() with the requested data.
Source
https://www.bankofcanada.ca/valet/docs
Examples
## Not run:
boc_metadata(group_name = "FX_RATES_DAILY")
boc_metadata(series_name = "FXUSDCAD")
## End(Not run)
Fetch Bank of England (BoE) data
Description
Retrieve time series data from the BoE database.
Usage
boe_data(key, start_date, end_date = Sys.Date())
Arguments
key |
( |
start_date |
( |
end_date |
( |
Value
A data.table::data.table() with the requested data.
Source
https://www.bankofengland.co.uk/boeapps/database
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# Bank Rate
boe_data("IUDBEDR", "2015-01-01")
# SONIA daily rate
boe_data("IUDSOIA", "2015-01-01")
# 10-year nominal par yield
boe_data("IUDMNPY", "2015-01-01")
# multiple series
boe_data(c("IUMABEDR", "IUALBEDR"), "2015-01-01")
Fetch Bank of Japan (BoJ) data
Description
Retrieve time series data from the Bank of Japan Statistics API.
Usage
boj_data(db, code, start_date = NULL, end_date = NULL, lang = "en")
Arguments
db |
( |
code |
( |
start_date |
( |
end_date |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
Source
https://www.stat-search.boj.or.jp/index_en.html
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# fetch USD/JPY exchange rate
boj_data("FM08", "FXERD01", start_date = "202401")
# fetch multiple exchange rates
boj_data("FM08", c("FXERD01", "FXERD02"), start_date = "202401")
Fetch Bank of Japan (BoJ) metadata
Description
Retrieve series metadata from the Bank of Japan Statistics API.
Usage
boj_metadata(db, lang = "en")
Arguments
db |
( |
lang |
( |
Value
A data.table::data.table() with the requested metadata.
Source
https://www.stat-search.boj.or.jp/index_en.html
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
boj_metadata("FM08")
Get or manage the bbk API cache
Description
bbk_cache_dir() returns the path where cached API responses are stored.
bbk_cache_clear() clears all cached responses.
Usage
bbk_cache_dir()
bbk_cache_clear()
Details
The cache is only used when enabled with options(bbk.cache = TRUE).
Cached responses are stored for 1 day by default, but this can be customized with
options(bbk.cache_max_age = seconds).
Examples
## Not run:
# enable caching
options(bbk.cache = TRUE)
# view cache location
bbk_cache_dir()
# clear the cache
bbk_cache_clear()
## End(Not run)
Fetch European Central Bank (ECB) data
Description
Retrieve time series data from the ECB SDMX Web Service.
Usage
ecb_data(
flow,
key = NULL,
start_period = NULL,
end_period = NULL,
first_n = NULL,
last_n = NULL,
updated_after = NULL
)
Arguments
flow |
( |
key |
( |
start_period |
(
If |
end_period |
( |
first_n |
( |
last_n |
( |
updated_after |
( |
Value
A data.table::data.table() with the requested data.
Source
https://data.ecb.europa.eu/help/api/data
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# fetch US dollar/Euro exchange rate
ecb_data("EXR", "D.USD.EUR.SP00.A")
# fetch data for multiple keys
ecb_data("EXR", c("D.USD", "JPY.EUR.SP00.A"))
Fetch European Central Bank (ECB) dimensions
Description
Retrieve the dimension structure for a given dataflow from the ECB SDMX Web Service.
Usage
ecb_dimension(id)
Arguments
id |
( |
Value
A data.table::data.table() with columns:
id |
The dimension id (e.g., |
position |
The position of the dimension in the series key |
codelist |
The id of the associated codelist (e.g., |
Source
https://data.ecb.europa.eu/help/api/metadata
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
ecb_dimension("ECB_EXR1")
Fetch Euro foreign exchange reference rates
Description
Fetch the latest or historical Euro foreign exchange reference rates from the European Central Bank (ECB).
Usage
ecb_fx_rates(x = "latest")
ecb_euro_rates(x = "latest")
Arguments
x |
( |
Details
Note you can achieve the same by calling the ecb_data() function with the right
parameters for each currency.
The reference rates are usually updated at around 16:00 CET every working day, except on TARGET closing days.
They are based on the daily concertation procedure between central banks across Europe, which normally takes place around 14:10 CET. The reference rates are published for information purposes only. Using the rates for transaction purposes is strongly discouraged.
Value
A data.table::data.table() with the exchange rates.
Source
Examples
ecb_fx_rates()
Fetch European Central Bank (ECB) metadata
Description
Retrieve metadata from the ECB time series database via the SDMX Web Service.
Usage
ecb_metadata(type, agency = NULL, id = NULL)
Arguments
type |
( |
agency |
( |
id |
( |
Value
A data.table::data.table() with the requested metadata.
The columns are:
agency |
The agency of the metadata |
id |
The id of the metadata |
name |
The name of the metadata |
Source
https://data.ecb.europa.eu/help/api/metadata
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
ecb_metadata("datastructure")
ecb_metadata("datastructure", "ECB")
ecb_metadata("datastructure", "ECB", "ECB_EXR1")
ecb_metadata("datastructure", id = "ECB_EXR1")
Fetch National Bank of Poland (NBP) exchange rates
Description
Retrieve foreign currency exchange rates from the NBP Web API.
Usage
nbp_fx_rates(
table,
code = NULL,
start_date = NULL,
end_date = NULL,
last_n = NULL
)
Arguments
table |
( |
code |
( |
start_date |
( |
end_date |
( |
last_n |
( |
Value
A data.table::data.table() with exchange rates.
Source
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
nbp_fx_rates("a", "eur")
Fetch National Bank of Poland (NBP) gold prices
Description
Retrieve the price of gold from the NBP Web API.
Usage
nbp_gold(start_date = NULL, end_date = NULL, last_n = NULL)
Arguments
start_date |
( |
end_date |
( |
last_n |
( |
Value
A data.table::data.table() with gold prices.
Source
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
nbp_gold(last_n = 10L)
Fetch Norges Bank (NoB) data
Description
Retrieve time series data from the Norges Bank SDMX Web Service.
Usage
nob_data(
flow,
key = NULL,
start_period = NULL,
end_period = NULL,
first_n = NULL,
last_n = NULL
)
Arguments
flow |
( |
key |
( |
start_period |
( |
end_period |
( |
first_n |
( |
last_n |
( |
Value
A data.table::data.table() with the requested data.
Source
https://www.norges-bank.no/en/topics/Statistics/open-data/
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# fetch USD/NOK exchange rate
nob_data("EXR", "B.USD.NOK.SP", last_n = 5L)
# fetch multiple exchange rates
nob_data("EXR", "B.USD+EUR+GBP.NOK.SP", start_period = "2024-01-01")
# fetch policy rate
nob_data("IR", last_n = 5L)
Fetch Norges Bank (NoB) dimensions
Description
Retrieve the dimension structure for a given dataflow from the Norges Bank SDMX Web Service.
Usage
nob_dimension(id)
Arguments
id |
( |
Value
A data.table::data.table() with columns:
id |
The dimension id (e.g., |
position |
The position of the dimension in the series key |
codelist |
The id of the associated codelist (e.g., |
Source
https://www.norges-bank.no/en/topics/Statistics/open-data/
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
nob_dimension("DSD_EXR")
Fetch Norges Bank (NoB) metadata
Description
Retrieve metadata from the Norges Bank SDMX Web Service.
Usage
nob_metadata(type, id = NULL, lang = "en")
Arguments
type |
( |
id |
( |
lang |
( |
Value
A data.table::data.table() with the requested metadata.
Source
https://www.norges-bank.no/en/topics/Statistics/open-data/
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
nob_metadata("dataflow")
nob_metadata("datastructure")
nob_metadata("codelist", "CL_CURRENCY")
Fetch Österreichische Nationalbank (OeNB) data
Description
Retrieve time series data from the OeNB Web Service.
Usage
onb_data(
hier_id,
key,
...,
start_period = NULL,
end_period = NULL,
freq = NULL,
lang = "en"
)
Arguments
hier_id |
( |
key |
( |
... |
( |
start_period |
( |
end_period |
( |
freq |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
Source
https://www.oenb.at/en/Statistics/User-Defined-Tables/webservice.html
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
onb_data(hier_id = 11, key = "VDBFKBSC217000")
# Loans to euro area residents, since 2000:
onb_data(hier_id = 11, key = "VDBFKBSC217000", start_period = "2000-01-01")
# Austrian imports and exports of goods from/to Germany, 2002–2012, annual frequency:
onb_data(hier_id = 901, key = "VDBQZA1000", start_period = 2002, end_period = 2012, freq = "A")
# Number of Austrian banks' subsidiaries abroad and in the EU, from 2005, semiannual:
onb_data(
hier_id = 321,
key = c("VDBKISDANZTAU", "VDBKISDANZTEU"),
start_period = 200501,
freq = "H"
)
Fetch Österreichische Nationalbank (OeNB) dimension
Description
Fetch Österreichische Nationalbank (OeNB) dimension
Usage
onb_dimension(hier_id, key, lang = "en")
Arguments
hier_id |
( |
key |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
onb_dimension(hier_id = 11, key = "VDBFKBSC217000")
Fetch Österreichische Nationalbank (OeNB) data frequency
Description
Fetch Österreichische Nationalbank (OeNB) data frequency
Usage
onb_frequency(hier_id, key, ..., lang = "en")
Arguments
hier_id |
( |
key |
( |
... |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
onb_frequency(hier_id = 74, key = "VDBOSBHAGBSTIN")
onb_frequency(hier_id = 11, key = "VDBFKBSC217000")
Fetch Österreichische Nationalbank (OeNB) hierarchy
Description
Fetch Österreichische Nationalbank (OeNB) hierarchy
Usage
onb_hierarchy(hier_id, lang = "en")
Arguments
hier_id |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
onb_hierarchy(hier_id = 11)
Fetch Österreichische Nationalbank (OeNB) metadata
Description
Fetch Österreichische Nationalbank (OeNB) metadata
Usage
onb_metadata(hier_id, key, ..., lang = "en")
Arguments
hier_id |
( |
key |
( |
... |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_toc(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
onb_metadata(hier_id = 11, key = "VDBFKBSC217000")
Fetch Österreichische Nationalbank (OeNB) table of contents
Description
Fetch Österreichische Nationalbank (OeNB) table of contents
Usage
onb_toc(lang = "en")
Arguments
lang |
( |
Value
A data.table::data.table() with the requested data.
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
snb_dimension(),
srb_calendar(),
srb_series()
Examples
onb_toc()
Fetch Swiss National Bank (SNB) data
Description
Retrieve time series data from the SNB data portal.
Usage
snb_data(key, start_date = NULL, end_date = NULL, lang = "en")
Arguments
key |
( |
start_date |
( |
end_date |
( |
lang |
( |
Value
A data.table::data.table() with the requested data.
Source
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
srb_cross_rates(),
srb_data()
Examples
snb_data("rendopar")
# or filter for date range
snb_data("rendopar", "2020-01-01", "2020-12-31")
Fetch Swiss National Bank (SNB) dimensions
Description
Retrieve the dimension structure for a given cube from the SNB data portal.
Usage
snb_dimension(key, lang = "en")
Arguments
key |
( |
lang |
( |
Value
A data.table::data.table() with the dimension structure.
Source
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
srb_calendar(),
srb_series()
Examples
snb_dimension("rendopar")
Fetch Sveriges Riksbank (SRb) calendar days
Description
Retrieve Swedish banking calendar information from the Sveriges Riksbank SWEA API.
Usage
srb_calendar(start_date, end_date = NULL)
Arguments
start_date |
( |
end_date |
( |
Value
A data.table::data.table() with the calendar day information.
Source
https://developer.api.riksbank.se/
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_series()
Examples
srb_calendar("2024-01-01", "2024-01-31")
Fetch Sveriges Riksbank (SRb) cross rates
Description
Compute cross exchange rates between two currency series from the Sveriges Riksbank SWEA API.
Usage
srb_cross_rates(series1, series2, start_date, end_date = NULL)
Arguments
series1 |
( |
series2 |
( |
start_date |
( |
end_date |
( |
Value
A data.table::data.table() with the cross rate data.
Source
https://developer.api.riksbank.se/
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_data()
Examples
# USD/EUR cross rate
srb_cross_rates("SEKUSDPMI", "SEKEURPMI", start_date = "2024-01-01", end_date = "2024-01-31")
Fetch Sveriges Riksbank (SRb) data
Description
Retrieve time series data from the Sveriges Riksbank SWEA API.
Usage
srb_data(series, start_date = NULL, end_date = NULL)
Arguments
series |
( |
start_date |
( |
end_date |
( |
Value
A data.table::data.table() with the requested data.
Source
https://developer.api.riksbank.se/
See Also
Other data:
bbk_data(),
bbk_series(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates()
Examples
# fetch USD/SEK exchange rate
srb_data("SEKUSDPMI", start_date = "2024-01-01")
# fetch EUR/SEK exchange rate
srb_data("SEKEURPMI", start_date = "2024-01-01")
Fetch Sveriges Riksbank (SRb) series metadata
Description
Retrieve available series or group metadata from the Sveriges Riksbank SWEA API.
Usage
srb_series(type = "series")
Arguments
type |
( |
Value
A data.table::data.table() with the requested metadata.
Source
https://developer.api.riksbank.se/
See Also
Other metadata:
bbk_dimension(),
bbk_metadata(),
bdp_dataset(),
bdp_dimension(),
bdp_domain(),
bdp_series(),
bis_dimension(),
bis_metadata(),
boj_metadata(),
ecb_dimension(),
ecb_metadata(),
nob_dimension(),
nob_metadata(),
onb_dimension(),
onb_frequency(),
onb_hierarchy(),
onb_metadata(),
onb_toc(),
snb_dimension(),
srb_calendar()
Examples
srb_series()