Skip to contents

This function allows you to obtain daily interbank money market rates and volumes of transactions according to tenure. (2015 - present) from the BNM API.

Usage

get_interest_volume(
  product = "money_market_operations",
  date = NULL,
  year = NULL,
  month = NULL
)

Source

https://api.bnm.gov.my/

Arguments

product

One of "money_market_operations", "interbank" or "overall"

date

Character string of date with format as defined by RFC 3339, section 5.6 (YYYY-MM-DD). If specified, return values for the specified date.

year

Year and month as integers. If date, year and month left blank, return today's values.

month

Year and month as integers. If date, year and month left blank, return today's values.

Examples

if (FALSE) get_interest_volume()
get_interest_volume(date = "2018-01-01")
#> # A tibble: 1 x 5
#>   date       overnight `1_week` `1_month` other
#>   <chr>          <int>    <int>     <int> <int>
#> 1 2018-01-01     33100     1430       200  5030
get_interest_volume(year = 2016, month = 2)
#> # A tibble: 29 x 8
#>    date       overnight `1_week` `1_month` `3_month` `6_month` `1_year` other
#>    <chr>          <int>    <int>     <int> <lgl>     <lgl>     <lgl>    <int>
#>  1 2016-02-01     32000     3860        NA NA        NA        NA        3140
#>  2 2016-02-02     32000     1860      7030 NA        NA        NA        4355
#>  3 2016-02-03     32000       NA        NA NA        NA        NA        4180
#>  4 2016-02-04     32000     3000        NA NA        NA        NA          NA
#>  5 2016-02-05     30000       NA        NA NA        NA        NA        3050
#>  6 2016-02-06     30000       NA        NA NA        NA        NA        3050
#>  7 2016-02-07     30000       NA        NA NA        NA        NA        3050
#>  8 2016-02-08     30000       NA        NA NA        NA        NA        3050
#>  9 2016-02-09     30000       NA        NA NA        NA        NA        3050
#> 10 2016-02-10     30000     3800        NA NA        NA        NA        3280
#> # ... with 19 more rows
get_interest_volume(product = "overall", year = 2016, month = 2)
#> # A tibble: 28 x 8
#>    date       overnight `1_week` `1_month` `3_month` `6_month` `1_year` other
#>    <chr>          <dbl>    <int>     <dbl> <lgl>     <lgl>     <lgl>    <int>
#>  1 2016-02-01    34068.     3860       150 NA        NA        NA        3362
#>  2 2016-02-02    33709.     2160      7110 NA        NA        NA        4355
#>  3 2016-02-03    34533.      155        50 NA        NA        NA        4180
#>  4 2016-02-04    34696.     3290        NA NA        NA        NA         150
#>  5 2016-02-05    32216.      200        NA NA        NA        NA        3750
#>  6 2016-02-06    32216.      200        NA NA        NA        NA        3750
#>  7 2016-02-07    32216.      200        NA NA        NA        NA        3750
#>  8 2016-02-08    32216.      200        NA NA        NA        NA        3750
#>  9 2016-02-10    32486.     3900        NA NA        NA        NA        3530
#> 10 2016-02-11    34464.     2500        NA NA        NA        NA        1250
#> # ... with 18 more rows