Skip to contents

Retrieve the Czech Overnight Index Average (CZEONIA) reference rate from the CNB API.

Usage

cnb_czeonia(date = NULL, year = NULL)

Arguments

date

(NULL | character(1) | Date(1))
The date to query. If NULL, the latest available rates are returned. Mutually exclusive with year. Default NULL.

year

(NULL | integer(1))
A calendar year, returning rates for every working day of that year. Mutually exclusive with date. Default NULL.

Value

A data.table::data.table() with the requested rates. The czeonia column holds the rate in percent and volume the trading volume in millions of Czech koruna.

Examples

# \donttest{
# latest rate
cnb_czeonia()
#>          date czeonia volume
#>        <Date>   <num>  <int>
#> 1: 2026-06-11    3.17   8110

# all rates for a given year
cnb_czeonia(year = 2024L)
#>            date czeonia volume
#>          <Date>   <num>  <int>
#>   1: 2024-01-02    5.80 148757
#>   2: 2024-01-03    5.80  76156
#>   3: 2024-01-04    6.51  15554
#>   4: 2024-01-05    6.45  17510
#>   5: 2024-01-08    6.56  13277
#>  ---                          
#> 248: 2024-12-20    3.68  21338
#> 249: 2024-12-23    3.03  54766
#> 250: 2024-12-27    3.04  62260
#> 251: 2024-12-30    3.03  88900
#> 252: 2024-12-31    3.00 150350
# }