# Where can I retreive the end of day fx prices?

I'm developing a reporting tool and I need a data source for end of day price data. For example, it should give me the XAUUSD price at a specific date, say 2019-12-05.
Do you know such a data source?

Thanks

Some brokerage does provide such info. For instance FXCM or DukasCopy (I believe some others too) provide access to it's historical quotes. See for example here https://www.dukascopy.com/swiss/english/marketwatch/historical/.

You may want to check out W. Antweiler's Pacifix Exchange Rate Service. It's free, but you should check whether your application is in line with its terms of use. Some time ago I wrote a small R package for downloading data from the site, but I have not used the package for years.

From experience, the most reliable data sources are from central banks. The problem is that they often only report the exchange rate to their own currency. For example, the European Central Bank reports every currency against the EUR (ECB), the US Fed against the USD (Fed) and the Swiss national Bank all currencies against the CHF (SNB).

But it's easy to compute the rates from any pair given you have official rates against a major currency (EUR, USD, CHF etc.)

$$\frac{C_1}{C_2} = \frac{1}{\frac{C_3}{C_1}} * \frac{C_3}{C_2}$$

$$C_1$$ being your first currency (e.g. AUD), $$C_2$$ the second (USD) and $$C_3$$ a major currency you got common exchange rate information for (e.g. EUR).

Data from the ECB (end of day exchange rates against EUR) is also available for free on Quandl. There's also a API for which you need to register to get a free API key.

In R this is how I calculate:

library(tidyverse)
library(Quandl)

Quandl.api_key(KEY) # get your personal API key on Quandl.com

get_exchange <- function(currency1, currency2) {
if (currency1 == "EUR") {
out <- Quandl(paste0("ECB/", currency1, currency2))
return(out %>% rename(!!paste0(currency1, currency2) := 2))
}
if (currency2 == "EUR") {
out <- Quandl(paste0("ECB/", currency1, currency2))

out <- out %>%
mutate(Value = 1/Value)

return(out %>% rename(!!paste0(currency2, currency1) := 2))
}

EURcur1 <- Quandl(paste0("ECB/EUR", currency1))
EURcur2 <- Quandl(paste0("ECB/EUR", currency2))

currencies <- left_join(EURcur1 %>% rename(EURcur1 = 2),
EURcur2 %>% rename(EURcur2 = 2),
by = "Date")

currencies %>%
mutate(!!paste0(currency1, currency2) := 1/EURcur1 * EURcur2) %>%
select(-EURcur1, -EURcur2)
}

AUDUSD <- get_exchange("AUD", "USD")

AUDUSD %>% as_tibble()


End of day is tricky in Foreign Exchange, which trades around the world in multiple centers (multiple time zones). By 'end of day price data' I assume you mean the 5pm New York price. (Could also be London, where XAU is heavily traded, etc.).

I signed up to receive the data every day in an Email that is sent to me from Barchart.Com at 5:45pm NY Time every day. It is convenient and it is free.

(For 2019-12-05, the date that you mentioned, they give a price of 1,475.64).