A client for retrieving data and metadata from central bank APIs including 'Banco Central do Brasil' (BCB), 'Banco de España' (BdE), 'Banco de México' (Banxico), 'Banco de Portugal' (BdP), 'Bank for International Settlements' (BIS), 'Bank of Canada' (BoC), 'Bank of England' (BoE), 'Bank of Israel' (BoI), 'Bank of Japan' (BoJ), 'Banque de France' (BdF), 'Czech National Bank' (CNB), '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).
bbk is minimal R client for the following APIs:
In the future, it may be extended to other central banks and financial institutions. Feel free to open an issue if you have a specific request.
You can install the released version of bbk from CRAN with:
install.packages("bbk")
And the development version from GitHub with:
# install.packages("pak")
pak::pak("m-muecke/bbk")
bbk functions are prefixed according to the central bank they access
(bbk_, ecb_, snb_, bdp_, bis_, boe_, boi_, boj_, bde_,
bdf_, bcb_, cnb_, nbp_, onb_, boc_, nob_, srb_) and
follow the naming conventions of their respective APIs.
The typical workflow involves:
library(bbk)
# Deutsche Bundesbank - fetch 10 year daily yield curve
yield_curve = bbk_data(
flow = "BBSIS",
key = "D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A",
start_period = "2020-01-01"
)