Retrieving interest rates and exchange rates via API

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. Information on the Riksbank’s web service for interest rates and exchange rates is presented here. The web service only supports SOAP version 1.2. SOAP version 1.1 is no longer supported.

Information on change affecting “getAnnualAverageExchangeRates”

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, for example it was possible to obtain annual data on any day of the year. The reason for the adjustment is that API users could not know when a period or a result was established. Consequently, monthly and annual averages for the current period are now calculated on the final banking day of the month at 12.05, which is to say after publication for the day.

Methods

The Riksbank’s web service for interest rates and exchange rates has a number of methods you can invoke to search interest rates and exchange rates, cross rates, series names, various aggregates per period (month, quarter, year) and so on. For each period, minimum, maximum, average and ultimo (final banking day of the month) values can also be retrieved.

The web service provides the following methods:

  • getAllCrossNames
  • getAnnualAverageExchangeRates
  • getCrossRates
  • getCalendarDays
  • getInterestAndExchangeNames
  • getInterestAndExchangeGroupNames
  • getInterestAndExchangeRates
  • getLatestInterestAndExchangeRates
  • getMonthlyAverageExchangeRates

The WSDL file can be reached via the address:

https://swea.riksbank.se/sweaWS/wsdl/sweaWS_ssl.wsdl

Complete technical documentation for the Riksbank’s web service:

https://swea.riksbank.se/sweaWS/docs/api/index.htm

To retrieve series for one period, follow these instructions:

  1. Find the series for which you would like retrieve observations in the list Series for the web service and note the group ID and series ID.
    Series for the web service
  2. Invoke the web service with the selected group ID and series ID, as well as other parameters; see the link: https://swea.riksbank.se/sweaWS/docs/api/call/getInterestAndExchangeRates.htm

Questions

If you have questions on the Riksbank’s API for interest rates and exchange rates, email: API@riksbank.se

Disclaimer

  • The Riksbank disclaims liability for any errors or changes in listings afterwards and for any interruptions in the functioning of the website that may affect access to the statistical database.
  • The Riksbank reserves the right to make updates/changes to the website that may affect the downloading of statistics.

Disclaimer

Nasdaq Swedish Foreign Exchange Fixing Rates is provided by Nasdaq Stockholm AB and shall not without Nasdaq Stockholm AB´s prior written consent be used:

  1. As reference for the issuance of a financial instrument;
  2. As reference for the determination of the amount payable under a financial instrument or a financial contract;
  3. As reference by a party to a financial contract;
  4. For measuring the performance of an investment fund for the purpose of tracking the return of Nasdaq Swedish Foreign Exchange Fixing Rates, of defining the asset allocation of a portfolio, or of computing the performance fees;
  5. For any other purpose which may qualify Nasdaq Swedish Foreign Exchange Fixing Rates as a benchmark in accordance with regulation (EU) 2016/1011 of the European Parliament and of the European Council on indices used as benchmarks in financial instruments and financial contracts.
Was this information helpful? After your answear a textbox appears

Thanks for your feedback!

Updated 21/01/2021