Skip to contents

Returns Bundesbank data for a given flow and key

Usage

bbk_data(
  flow,
  key = NULL,
  start_period = NULL,
  end_period = NULL,
  first_n = NULL,
  last_n = NULL
)

Arguments

flow

(character(1)) flow to query, 5-8 characters. See bbk_metadata() for available dataflows.

key

(character(1)) key to query.

start_period

(character(1)) start date of the data. Supported formats:

  • YYYY for annual data (e.g., "2019")

  • YYYY-S[1-2] for semi-annual data (e.g., "2019-S1")

  • YYYY-Q[1-4] for quarterly data (e.g., "2019-Q1")

  • YYYY-MM for monthly data (e.g., "2019-01")

  • YYYY-W[01-53] for weekly data (e.g., "2019-W01")

  • YYYY-MM-DD for daily and business data (e.g., "2019-01-01") If NULL, no start date restriction is applied (data retrieved from the earliest available date). Default NULL.

end_period

(character(1)) end date of the data, in the same format as start_period. If NULL, no end date restriction is applied (data retrieved up to the most recent available date). Default NULL.

first_n

(numeric(1)) number of observations to retrieve from the start of the series. If NULL, no restriction is applied. Default NULL.

last_n

(numeric(1)) number of observations to retrieve from the end of the series. If NULL, no restriction is applied. Default NULL.

Value

A data.table::data.table() with the requested data.

See also

Other data: bbk_series(), ecb_data(), snb_data()

Examples

# \donttest{
# fetch all data for a given flow and key
bbk_data("BBSIS", "D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A")
#>             date                                                   key value
#>           <Date>                                                <char> <num>
#>    1: 1997-08-07 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  5.76
#>    2: 1997-08-08 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  5.76
#>    3: 1997-08-11 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  5.75
#>    4: 1997-08-12 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  5.72
#>    5: 1997-08-13 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  5.77
#>   ---                                                                       
#> 6962: 2025-01-10 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.59
#> 6963: 2025-01-13 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.63
#> 6964: 2025-01-14 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.63
#> 6965: 2025-01-15 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.64
#> 6966: 2025-01-16 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.58
#>                                                                                                                                                                    title
#>                                                                                                                                                                   <char>
#>    1: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>    2: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>    3: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>    4: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>    5: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   ---                                                                                                                                                                   
#> 6962: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 6963: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 6964: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 6965: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 6966: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>         freq bearer_reg   item valuation currency issuer_class listed_sub
#>       <char>     <char> <char>    <char>   <char>       <char>     <char>
#>    1:  daily          I    ZAR        ZI      EUR        S1311          B
#>    2:  daily          I    ZAR        ZI      EUR        S1311          B
#>    3:  daily          I    ZAR        ZI      EUR        S1311          B
#>    4:  daily          I    ZAR        ZI      EUR        S1311          B
#>    5:  daily          I    ZAR        ZI      EUR        S1311          B
#>   ---                                                                    
#> 6962:  daily          I    ZAR        ZI      EUR        S1311          B
#> 6963:  daily          I    ZAR        ZI      EUR        S1311          B
#> 6964:  daily          I    ZAR        ZI      EUR        S1311          B
#> 6965:  daily          I    ZAR        ZI      EUR        S1311          B
#> 6966:  daily          I    ZAR        ZI      EUR        S1311          B
#>       security_class maturity interest_type interest_rate redemption
#>               <char>   <char>        <char>        <char>     <char>
#>    1:           A604    R10XX             R             A          A
#>    2:           A604    R10XX             R             A          A
#>    3:           A604    R10XX             R             A          A
#>    4:           A604    R10XX             R             A          A
#>    5:           A604    R10XX             R             A          A
#>   ---                                                               
#> 6962:           A604    R10XX             R             A          A
#> 6963:           A604    R10XX             R             A          A
#> 6964:           A604    R10XX             R             A          A
#> 6965:           A604    R10XX             R             A          A
#> 6966:           A604    R10XX             R             A          A
#>       certificate coverage rating time_format decimals    unit unit_mult
#>            <char>   <char> <char>      <char>    <int>  <char>    <char>
#>    1:          _Z       _Z      A         P1D        2 PROZENT         0
#>    2:          _Z       _Z      A         P1D        2 PROZENT         0
#>    3:          _Z       _Z      A         P1D        2 PROZENT         0
#>    4:          _Z       _Z      A         P1D        2 PROZENT         0
#>    5:          _Z       _Z      A         P1D        2 PROZENT         0
#>   ---                                                                   
#> 6962:          _Z       _Z      A         P1D        2 PROZENT         0
#> 6963:          _Z       _Z      A         P1D        2 PROZENT         0
#> 6964:          _Z       _Z      A         P1D        2 PROZENT         0
#> 6965:          _Z       _Z      A         P1D        2 PROZENT         0
#> 6966:          _Z       _Z      A         P1D        2 PROZENT         0
#>       category unit_eng
#>         <char>   <char>
#>    1:     GKZR  percent
#>    2:     GKZR  percent
#>    3:     GKZR  percent
#>    4:     GKZR  percent
#>    5:     GKZR  percent
#>   ---                  
#> 6962:     GKZR  percent
#> 6963:     GKZR  percent
#> 6964:     GKZR  percent
#> 6965:     GKZR  percent
#> 6966:     GKZR  percent
# fetch data for multiple keys
bbk_data("BBK01", c("TTA032", "TTA010"))
#>             date          key   value
#>           <Date>       <char>   <num>
#>    1: 1998-12-22 BBK01.TTA010       0
#>    2: 1999-01-01 BBK01.TTA010       0
#>    3: 1999-01-08 BBK01.TTA010       0
#>    4: 1999-01-15 BBK01.TTA010       0
#>    5: 1999-01-22 BBK01.TTA010       0
#>   ---                                
#> 5180: 2023-09-29 BBK01.TTA032 2510103
#> 5181: 2023-10-06 BBK01.TTA032 2506613
#> 5182: 2023-10-13 BBK01.TTA032 2504519
#> 5183: 2023-10-20 BBK01.TTA032 2509279
#> 5184: 2023-10-27 BBK01.TTA032 2511960
#>                                                                                                                                                 title
#>                                                                                                                                                <char>
#>    1: Claims on non-euro area residents denominated in Euro / claims arising from the credit facility under ERM II / unadjusted / Deutsche Bundesbank
#>    2: Claims on non-euro area residents denominated in Euro / claims arising from the credit facility under ERM II / unadjusted / Deutsche Bundesbank
#>    3: Claims on non-euro area residents denominated in Euro / claims arising from the credit facility under ERM II / unadjusted / Deutsche Bundesbank
#>    4: Claims on non-euro area residents denominated in Euro / claims arising from the credit facility under ERM II / unadjusted / Deutsche Bundesbank
#>    5: Claims on non-euro area residents denominated in Euro / claims arising from the credit facility under ERM II / unadjusted / Deutsche Bundesbank
#>   ---                                                                                                                                                
#> 5180:                                                                                                 Total assets / unadjusted / Deutsche Bundesbank
#> 5181:                                                                                                 Total assets / unadjusted / Deutsche Bundesbank
#> 5182:                                                                                                 Total assets / unadjusted / Deutsche Bundesbank
#> 5183:                                                                                                 Total assets / unadjusted / Deutsche Bundesbank
#> 5184:                                                                                                 Total assets / unadjusted / Deutsche Bundesbank
#>         freq   dim1 time_format decimals   unit unit_mult
#>       <char> <char>      <char>    <int> <char>    <char>
#>    1:  daily TTA010         P1D        0   EURO         6
#>    2:  daily TTA010         P1D        0   EURO         6
#>    3:  daily TTA010         P1D        0   EURO         6
#>    4:  daily TTA010         P1D        0   EURO         6
#>    5:  daily TTA010         P1D        0   EURO         6
#>   ---                                                    
#> 5180:  daily TTA032         P1D        0   EURO         6
#> 5181:  daily TTA032         P1D        0   EURO         6
#> 5182:  daily TTA032         P1D        0   EURO         6
#> 5183:  daily TTA032         P1D        0   EURO         6
#> 5184:  daily TTA032         P1D        0   EURO         6
# specified period (start date-end date) for daily 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"
)
#>            date                                                   key value
#>          <Date>                                                <char> <num>
#>   1: 2020-01-02 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.16
#>   2: 2020-01-03 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.27
#>   3: 2020-01-06 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.27
#>   4: 2020-01-07 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.27
#>   5: 2020-01-08 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.27
#>  ---                                                                       
#> 144: 2020-07-27 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.48
#> 145: 2020-07-28 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.52
#> 146: 2020-07-29 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.53
#> 147: 2020-07-30 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.55
#> 148: 2020-07-31 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A -0.57
#>                                                                                                                                                                   title
#>                                                                                                                                                                  <char>
#>   1: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   2: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   3: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   4: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   5: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>  ---                                                                                                                                                                   
#> 144: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 145: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 146: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 147: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 148: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>        freq bearer_reg   item valuation currency issuer_class listed_sub
#>      <char>     <char> <char>    <char>   <char>       <char>     <char>
#>   1:  daily          I    ZAR        ZI      EUR        S1311          B
#>   2:  daily          I    ZAR        ZI      EUR        S1311          B
#>   3:  daily          I    ZAR        ZI      EUR        S1311          B
#>   4:  daily          I    ZAR        ZI      EUR        S1311          B
#>   5:  daily          I    ZAR        ZI      EUR        S1311          B
#>  ---                                                                    
#> 144:  daily          I    ZAR        ZI      EUR        S1311          B
#> 145:  daily          I    ZAR        ZI      EUR        S1311          B
#> 146:  daily          I    ZAR        ZI      EUR        S1311          B
#> 147:  daily          I    ZAR        ZI      EUR        S1311          B
#> 148:  daily          I    ZAR        ZI      EUR        S1311          B
#>      security_class maturity interest_type interest_rate redemption certificate
#>              <char>   <char>        <char>        <char>     <char>      <char>
#>   1:           A604    R10XX             R             A          A          _Z
#>   2:           A604    R10XX             R             A          A          _Z
#>   3:           A604    R10XX             R             A          A          _Z
#>   4:           A604    R10XX             R             A          A          _Z
#>   5:           A604    R10XX             R             A          A          _Z
#>  ---                                                                           
#> 144:           A604    R10XX             R             A          A          _Z
#> 145:           A604    R10XX             R             A          A          _Z
#> 146:           A604    R10XX             R             A          A          _Z
#> 147:           A604    R10XX             R             A          A          _Z
#> 148:           A604    R10XX             R             A          A          _Z
#>      coverage rating time_format decimals    unit unit_mult category unit_eng
#>        <char> <char>      <char>    <int>  <char>    <char>   <char>   <char>
#>   1:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   2:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   3:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   4:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   5:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>  ---                                                                         
#> 144:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 145:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 146:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 147:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 148:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
# or only specify the start date
bbk_data(
  "BBSIS", "D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A",
  start_period = "2024-04-01"
)
#>            date                                                   key value
#>          <Date>                                                <char> <num>
#>   1: 2024-04-02 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.37
#>   2: 2024-04-03 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.41
#>   3: 2024-04-04 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.39
#>   4: 2024-04-05 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.37
#>   5: 2024-04-08 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.46
#>  ---                                                                       
#> 198: 2025-01-10 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.59
#> 199: 2025-01-13 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.63
#> 200: 2025-01-14 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.63
#> 201: 2025-01-15 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.64
#> 202: 2025-01-16 BBSIS.D.I.ZAR.ZI.EUR.S1311.B.A604.R10XX.R.A.A._Z._Z.A  2.58
#>                                                                                                                                                                   title
#>                                                                                                                                                                  <char>
#>   1: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   2: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   3: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   4: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>   5: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>  ---                                                                                                                                                                   
#> 198: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 199: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 200: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 201: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#> 202: Yields, derived from the term structure of interest rates, on listed Federal securities with annual coupon payments / residual maturity of 10.0 years / daily data
#>        freq bearer_reg   item valuation currency issuer_class listed_sub
#>      <char>     <char> <char>    <char>   <char>       <char>     <char>
#>   1:  daily          I    ZAR        ZI      EUR        S1311          B
#>   2:  daily          I    ZAR        ZI      EUR        S1311          B
#>   3:  daily          I    ZAR        ZI      EUR        S1311          B
#>   4:  daily          I    ZAR        ZI      EUR        S1311          B
#>   5:  daily          I    ZAR        ZI      EUR        S1311          B
#>  ---                                                                    
#> 198:  daily          I    ZAR        ZI      EUR        S1311          B
#> 199:  daily          I    ZAR        ZI      EUR        S1311          B
#> 200:  daily          I    ZAR        ZI      EUR        S1311          B
#> 201:  daily          I    ZAR        ZI      EUR        S1311          B
#> 202:  daily          I    ZAR        ZI      EUR        S1311          B
#>      security_class maturity interest_type interest_rate redemption certificate
#>              <char>   <char>        <char>        <char>     <char>      <char>
#>   1:           A604    R10XX             R             A          A          _Z
#>   2:           A604    R10XX             R             A          A          _Z
#>   3:           A604    R10XX             R             A          A          _Z
#>   4:           A604    R10XX             R             A          A          _Z
#>   5:           A604    R10XX             R             A          A          _Z
#>  ---                                                                           
#> 198:           A604    R10XX             R             A          A          _Z
#> 199:           A604    R10XX             R             A          A          _Z
#> 200:           A604    R10XX             R             A          A          _Z
#> 201:           A604    R10XX             R             A          A          _Z
#> 202:           A604    R10XX             R             A          A          _Z
#>      coverage rating time_format decimals    unit unit_mult category unit_eng
#>        <char> <char>      <char>    <int>  <char>    <char>   <char>   <char>
#>   1:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   2:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   3:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   4:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>   5:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#>  ---                                                                         
#> 198:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 199:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 200:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 201:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
#> 202:       _Z      A         P1D        2 PROZENT         0     GKZR  percent
# }