boe_exchange_rate: Download sterling exchange rates

View source: R/boe_exchange_rate.R

boe_exchange_rateR Documentation

Download sterling exchange rates

Description

Downloads daily spot exchange rates for sterling against major currencies from the Bank of England. Most series available from January 1975.

Usage

boe_exchange_rate(
  currency = "USD",
  from = "1975-01-02",
  to = Sys.Date(),
  cache = TRUE
)

Arguments

currency

Character vector. One or more currency codes. Use list_exchange_rates() to see all available currencies. Defaults to "USD".

from

Date or character (YYYY-MM-DD). Start date. Defaults to "1975-01-02".

to

Date or character (YYYY-MM-DD). End date. Defaults to today.

cache

Logical. Use cached data if available (default TRUE).

Value

A data frame with columns:

date

Date. Observation date.

currency

Character. Currency code (e.g. "USD").

rate

Numeric. Units of foreign currency per GBP.

Source

https://www.bankofengland.co.uk/boeapps/database/

Examples


# GBP/USD since 2020
boe_exchange_rate("USD", from = "2020-01-01")

# Multiple currencies
boe_exchange_rate(c("USD", "EUR", "JPY"), from = "2020-01-01")



boe documentation built on March 12, 2026, 5:07 p.m.