The instruction how to retrieve currency exchange rates from the NBP website
Retrieving XML files containing NBP exchange rates
XML files containing NBP exchange rates can be found on the NBP website (www.nbp.pl) in folder:
In addition, the following file can be found in the same location under:
It contains the names of files (without .xml extension) with tables specifying currency exchange rates.
As of 1 July 2015, the dir.txt file contains the current year’s data only. Data for the previous years can be found in dir2002.txt, dir2003.txt ... dir 2015.txt files. The file format has not changed.
The names of all files have the same format, i.e.:
gdzie poszczególne litery oznaczają:
x – letter denoting the type of a table:
nnn – 3-character (numerical) number of a table in a year;
- a - table of average foreign currency exchange rates;
- b - table of average exchange rates of inconvertible currencies;
- c - table of purchase and sale exchange rates;
- h - table of exchange rates of units of account.
z – letter ‘z’ (constant element)
rrmmdd – date of publication/effective date of the table in the following format (no spaces): last two digits of the number of a year, two digits of the number of a month and two digits of the number of a day.
.xml – standard extension of a xml file name.
The example of retrieving from the NBP website of an xml file with table A of average exchange rates published on 5 February 2010:
Present (recent) files with tables A, B and C are also available under the following names: LastA.xml, LastB.xml, LastC.xml. respectively
- In the dir.txt file, search is made by dates:
- The file being searched is found at: http://www.nbp.pl/kursy/xml/a025z100205.xml
Dates of NBP currency exchange rates publication:
- Table A of the average foreign currency exchange rates is published (updated) on the NBP website on business days, between 11:45 a.m. and 12:15 p.m.,
- Table B of the average foreign currency exchange rates is published (updated) on the NBP website on Wednesdays, between 11:45 a.m. and 12:15 p.m.,
- Table C of the purchase and sale foreign currency exchange rates and the table of units of account exchange rates are published (updated) on the NBP website on business days, between 7:45 a.m. and 8:15 a.m.
The rules for the use of data published on the NBP website can be found in the status of the service at:
- Details of the current exchange rates of foreign currencies in zlotys defined in § 2.3 and § 3 of Resolution No. 51/2002 of the Management Board of Narodowy Bank Polski of 23 September 2002 on the way of calculating and announcing current exchange rates of foreign currencies are available in the following Official Journal of the NBP No. 15/2017 (in Polish).
- The standard procedure is to download dir.txt file (after the date of its update). In this way, we get the list of all available names of files containing tables of currency exchange rates in a chronological order.