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:

/kursy/xml/*.xml

In addition, the following file can be found in the same location under:

http://www.nbp.pl/kursy/xml/dir.txt

It contains the names of files (without .xml extension) with tables specifying currency exchange rates.

The names of all files have the same format, i.e.:

'xnnnzrrmmdd.xml'

gdzie poszczególne litery oznaczają:

x – letter denoting the type of a table:

  • 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.
nnn – 3-character (numerical) number of a table in a year;

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:
  1. In the dir.txt file, search is made by dates:

  2. ...
    a024z100204
    c025z100205
    h025z100205
    a025z100205
    c026z100208
    h026z100208
    ...

  3. The file being searched is found at:
  4. http://www.nbp.pl/kursy/xml/a025z100205.xml
Present (recent) files with tables A, B and C are also available under the following names: LastA.xml, LastB.xml, LastC.xml. respectively

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:

http://www.nbp.pl/homen.aspx?f=/disclaimer_en.htm

Good practice:

  • 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 the National Bank of Poland of 23 September 2002 on the way of calculating and announcing current exchange rates of foreign currencies are available in the following Official Journals of the NBP No. 14/2002, item 39, No. 20/2002, item 51; No. 2/2004, item 3; No. 1/2007, item 2 and No. 18/2007, item 35.
  • 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.



NBP interest rates

Reference rate2.00
Lombard rate3.00
Deposit rate1.00
Rediscount rate2.25

Exchange rates

Table of 2014-10-22
1 EUR4.2228
1 USD3.3275
1 CHF3.5003
1 GBP5.3332
100 JPY3.1138

Monthly data

Quarterly data

Financial markets

Numismatics