Learn R Programming

bbk (version 0.11.0)

srb_cross_rates: Fetch Sveriges Riksbank (SRb) cross rates

Description

Compute cross exchange rates between two currency series from the Sveriges Riksbank SWEA API.

Usage

srb_cross_rates(series1, series2, start_date, end_date = NULL)

Value

A data.table::data.table() with the cross rate data.

Arguments

series1

(character(1))
The first series ID (e.g., "SEKUSDPMI").

series2

(character(1))
The second series ID (e.g., "SEKEURPMI").

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_data()

Examples

Run this code
# \donttest{
# USD/EUR cross rate
srb_cross_rates("SEKUSDPMI", "SEKEURPMI", start_date = "2024-01-01", end_date = "2024-01-31")
# }

Run the code above in your browser using DataLab