Learn R Programming

bbk (version 0.11.0)

srb_data: 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)

Value

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

Arguments

series

(character(1))
The series ID to query. See srb_series() for available series.

start_date

(NULL | Date(1) | character(1))
Start date of the data (e.g., "2024-01-01"). If NULL, all available data is returned. Default NULL.

end_date

(NULL | Date(1) | character(1))
End date of the data, in the same format as start_date. If NULL, data up to the latest available date is returned. Default NULL.

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(), cnb_czeonia(), cnb_data(), cnb_fx_other_rates(), cnb_fx_rates(), cnb_pribor(), ecb_data(), nbp_fx_rates(), nbp_gold(), nob_data(), onb_data(), snb_data(), srb_cross_rates()

Examples

Run this code
# \donttest{
# 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")
# }

Run the code above in your browser using DataLab