Frequently asked questions about the Riksbank’s web service for interest rates and exchange rates
The Riksbank provides an API (Application Programming Interface) in the form of a SOAP-based web service that allows the automatic collection of information on interest rates and exchange rates. On this page, we have gathered some frequently asked questions about the Riksbank’s web service for interest rates and exchange rates.
After 30 November 2020, it will not be possible to obtain monthly or annual averages for the current period using the method “getMonthlyAverageExchangeRates”
The Riksbank has adjusted getAnnualAverageExchangeRates. Previously, it was possible to obtain a mean value for a period that had not ended (current period). Previously, it was possible to obtain an average for any day of the year.
The reason for the adjustment is that API users could not know when a period/result was established. Consequently, monthly and annual averages for the current period are now calculated on the final banking day of the month or year at 12.05, which is to say after publication for the day.
Which versions of the communication protocol TLS are supported by the web service?
Our encrypted connection requires the web service TLS version 1.2. The Riksbank stopped supporting the older versions TLS version 1.0 and TLS version 1.1 on 4 April 2019. Support for TLS version 1.3 is being planned.
Which version of the SOAP protocol is supported?
From 20 November 2019, the Riksbank’s API has only supported SOAP 1.2.
Example of an http call with:
POST http://swea.riksbank.se:80/sweaWS/services/SweaWebServiceHttpSoap12Endpoint HTTP/1.1
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://swea.riksbank.se/xsd">
Parameters for getInterestAndExchangeRates
<!--1 or more repetitions:-->
Does the source have to be stated when distributing the statistics?
Yes, you must always state that Sveriges Riksbank is the source (“Source: Sveriges Riksbank”).
If I have processed statistics taken from the Riksbank’s website, do I still have to state the source?
No, in that case you should not state Sveriges Riksbank as the source.
May I use the API for commercial purposes?
Yes, you may. The Riksbank’s statistical database is freely available without charge and may be freely adapted and used without any particular permission or agreement being required.
Is there anything I cannot do with the API?
You may not use the API to spread harmful codes. Nor may you present the service you have developed as an “official cooperation” or “partnership” with the Riksbank.
How do I receive notification of new version of the API?
New versions will be announced at this page.
What does Ultimo mean?
Ultimo is the rate listed on the final banking day of the month. Example: Ultimo for SEK/EUR on 30 December 2011 = 8.9447.
Why does my search show “n/a” for some series?
N/a stands for Not available and means that one or more observations for the selected time period are unavailable. Check the period of validity for the series by clicking on the link Series information. The date in brackets after the series name shows the period during which there are observations for this series.
If a series has not yet been updated with the current day’s value, this will be reported as n/a (missing). Try to repeat your search a little later in the day.
A series can also be stated as n/a as a result of bank holidays.
Why doesn’t my search show observations for all of the selected series?
If a series is excluded from the results this is probably due to that series’ period of validity lying outside of the selected time period. Check the period of validity of the series. The date in brackets after the series name shows the period during which there are observations for this series.
Why does my result show strange values, or values as text instead of figures, in Excel?
If you select a different decimal separator than the start value suggested when the search interpretation opens, the figures may be indicated wrongly or interpreted as text when the file is opened in Excel. Go back to the search page and select the same decimal separator as that applying to Excel and then click on “Search” again.
Why won't my Excel file open?
This is often because you already have the Excel program open. In this case, switch from your web browser to Excel and check that a new file has opened.
What is the meaning of the date in brackets after a series name?
This date indicates the period during which there are observations for this series. If there is no final date in the brackets, the series is open. This means that it is usually updated with a new listing every day.
Why are some currencies expressed in single digits and others in hundreds?
In some cases, exchange rates are given as the price for 1 or 100 units of the foreign currency. The currency price fixing presented on the Riksbank’s website has the unit of 100 for some currencies. This is due purely to historical reasons leading to this practice still being applied.
How many decimals do interest rate and exchange rate observations have?
The values for interest rates and exchange rates are published with up to 4 decimals. In the web service, values are delivered in scientific format for the data type double. For example 1.0E1, which corresponds to 10.
Why aren’t å/ä/ö correctly shown in the presentation format CSV file in Excel when the file is opened in Macintosh?
This is because the file has the same character set as PC/Windows (ANSI). In order for Excel to be able to show å/ä/ö correctly the file must first be saved and then imported into Excel. Unfortunately the import guide does not open in Excel when the file is opened from Macintosh. It is therefore preferable to use, if possible, the Text file presentation format or to select Advanced Search in the English version of the website, rather than the Swedish version.
If you have questions about the Riksbank’s web service for interest rates and exchange rates