FAQ – The API for interest rates and exchange rates

The Riksbank has published a new REST API (Application Programming Interface) that makes it possible to automatically values for interest rates and exchange rates. On this page, we have gathered some frequently asked questions about the Riksbank’s API for interest rates and exchange rates.

What do I need to do if I currently have an integration with the Riksbank’s outgoing SOAP API?

You need to plan for a transition to the new REST API as the SOAP API is going to be phased out. To facilitate the transition, the SOAP API will remain in place alongside the new REST API until 27 May 2024.

Are there any restrictions on calling the new API?

We have a limit on the number of calls from the same IP address within a certain time span. If there is a greater need, it is possible to register on the API portal to obtain a personal API key that allows more calls.

How many calls can I make after I have registered?

As a registered user in the API portal, you can call our API 200 times per minute with a ceiling of 10,000 calls per week by using the API key found under your profile (either Primary Key or Secondary Key).

How do I register in the API portal?

Select Sign Up in the top right corner and register your details. Once you are logged in, go to Profile, at the bottom, which shows the Primary and Secondary Key. These are your API keys and you can use either of them.

How do I use the API key for calls?

You put the key in an http header called Ocp-Apim-Subscription-Key.

How should I use the new API?

A brief description of the terminology used may prove helpful in making the best use of the API. All interest rates and currencies are in series that are organised into groups. For example, the series SEKISKPMI (Icelandic currency) is included in GroupId 130, “Currencies against Swedish kronor”. This page, Series for the API, shows which series are available:

Each individual entry is called an observation. To retrieve an observation, specify the series from which it is to be retrieved and a date. The API can retrieve all existing groups and series. Once you know which series you are interested in, you can retrieve observations for them within given date ranges. The API also supports the retrieval of cross rates, the exchange rate between two foreign currencies calculated using rates against the Swedish krona. You can also retrieve aggregated data (week, month, year).

How do I get inverse rates?

An observation for the US dollar, for example, shows how many SEK are required for one unit. To invert the rate, divide 1 by the value you get. This tells you how 1 SEK relates to the other currency. You can also call our help series SEKETT to handle this for you. 

What unit are the currencies presented in?

The rate for all currencies is given as 1 Swedish krona against 1 unit of the foreign currency as from 27 November 2023. (Previously, the exchange rate was quoted in Swedish kronor against 100 units of the foreign currency for certain currencies).

Is it necessary to cite the source when disseminating statistics on interest rates and exchange rates?

Yes, you must always state that Sveriges Riksbank is the source (“Source: Sveriges Riksbank”).

The exchange rates published by the Riksbank as of 27 November 2023 are set by the ECB (European Central Bank), but converted by the Riksbank to rates against Swedish kronor. Previously, the Riksbank published exchange rates set by Nasdaq.  

If I have processed statistics on interest rates and exchange rates myself, 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 API is freely available without charge and the data 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 malware. 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 versions of the API?

New versions are announced on the Riksbank’s website or in the API portal.

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.

How many decimals do interest rate and exchange rate observations have?

In most cases, interest and exchange rate quotations are published with four decimal places, following the principle 1.2345. However, the number of decimals can vary. There may be fewer decimal places: if the last digit or digits are 0, they will not be displayed. More decimal places may also be given for some low value currencies. For example, for numbers less than 1 and greater than -1, four so-called significant figures are shown according to the principle 0.0001234. 


For more information on the API, email: API@riksbank.se

Was this information helpful? After your answear a textbox appears

Thanks for your feedback!

Your comment could not be sent, please try again later

Updated 27/11/2023