Euro foreign exchange reference rates
The reference rates are usually updated around 16:00 CET on every working day, except on TARGET closing days. They are based on a regular daily concertation procedure between central banks across Europe, which normally takes place at 14:15 CET.
Euro foreign exchange reference rates: 28 December 2020
Downloads
Current reference rates
- PDF last update: 28 December 2020
- CSV (.zip) last update: 28 December 2020
- XML last update: 28 December 2020
- RSS feeds
Historical reference rates
Between 16:00 CET on 28 November 2018 and 16:00 CET on 24 January 2019, some historical reference rate PDFs contained rates that were incorrect. All other formats (HTML, CSV, XML) contained the correct reference rates.
Historical reference rate PDFs for the following dates were affected: 28 May 2018, 29 May 2018, 30 May 2018, 4 June 2018, 5 June 2018, 6 June 2018, 14 June 2018, 12 November 2018, 19 November 2018, and 21 November 2018.
Time series
- CSV (.zip) last update: 28 December 2020
- XML last update: 28 December 2020
- XML (last 90 days only) last update: 28 December 2020
- XML (SDMX-ML) last update: 28 December 2020
To import CSV files into your spreadsheet, choose a setting that uses a dot "." as decimal separator (such as UK or US format).
Related information
How to parse the data in PHP
Regular expression example
<?php
//This is a PHP(4/5) script example on how eurofxref-daily.xml can be parsed
//Read eurofxref-daily.xml file in memory
//For this command you will need the config
//option allow_url_fopen=On (default)
$XMLContent=file("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml");
//the file is updated at around 16:00 CET
foreach($XMLContent as $line){
if(preg_match("/currency='([[:alpha:]]+)'/",$line,$currencyCode)){
if(preg_match("/rate='([[:graph:]]+)'/",$line,$rate)){
//Output the value of 1EUR for a currency code
echo'1€='.$rate[1].' '.$currencyCode[1].'<br/>';
//--------------------------------------------------
//Here you can add your code for inserting
//$rate[1] and $currencyCode[1] into your database
//--------------------------------------------------
}
}
}
?>
XML parser example
<?php
function StartElement($parser, $name, $attrs) {
if (!empty($attrs['RATE'])) {
echo "1€=".$attrs['RATE']." ".$attrs['CURRENCY']."<br />";
}
}
$xml_parser= xml_parser_create();
xml_set_element_handler($xml_parser, "StartElement", "");
// for the following command you will need file_get_contents (PHP >= 4.3.0)
// and the config option allow_url_fopen=On (default)
xml_parse($xml_parser, file_get_contents ("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"));
xml_parser_free($xml_parser);
?>
Example
SimpleXML.php
<?php
//This is aPHP(5)script example on how eurofxref-daily.xml can be parsed
//Read eurofxref-daily.xml file in memory
//For the next command you will need the config
//option allow_url_fopen=On (default)
$XML=simplexml_load_file("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml");
//the file is updated at around 16:00 CET
foreach($XML->Cube->Cube->Cube as $rate){
//Output the value of 1EUR for a currency code
echo '1€='.$rate["rate"].' '.$rate["currency"].'<br/>';
//--------------------------------------------------
//Here you can add your code for inserting
//$rate["rate"] and $rate["currency"] into your database
//--------------------------------------------------
}
?>
Output of the code above
1€=1.2219 USD
1€=126.54 JPY
1€=1.9558 BGN
1€=26.247 CZK
1€=7.4361 DKK
1€=0.90408 GBP
1€=363.46 HUF
1€=4.4907 PLN
1€=4.8745 RON
1€=10.1070 SEK
1€=1.0854 CHF
1€=156.10 ISK
1€=10.5713 NOK
1€=7.5435 HRK
1€=90.0681 RUB
1€=9.1254 TRY
1€=1.6083 AUD
1€=6.3443 BRL
1€=1.5677 CAD
1€=7.9906 CNY
1€=9.4731 HKD
1€=17337.66 IDR
1€=3.9275 ILS
1€=89.8145 INR
1€=1340.87 KRW
1€=24.3136 MXN
1€=4.9490 MYR
1€=1.7160 NZD
1€=58.700 PHP
1€=1.6237 SGD
1€=36.865 THB
1€=17.8008 ZAR
Framework for the euro foreign exchange reference rates:
ECB introduces changes to euro foreign exchange reference rates, 7 December 2015
