Webservice API reference

Example

Example of soap message:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://swea.riksbank.se/xsd">
	<soap:Header/>
	<soap:Body>
		<xsd:getInterestAndExchangeRates>
			<searchRequestParameters>
				<aggregateMethod>D</aggregateMethod>
				<datefrom>2019-10-25</datefrom>
				<dateto>2019-11-26</dateto>
				<languageid>en</languageid>
				<min>false</min>
				<avg>true</avg>
				<max>true</max>
				<ultimo>false</ultimo>
				<!--1 or more repetitions:-->
				<searchGroupSeries>
					<groupid>11</groupid>
					<seriesid>SEKEURPMI</seriesid>
				</searchGroupSeries>
			</searchRequestParameters>
		</xsd:getInterestAndExchangeRates>
	</soap:Body>
</soap:Envelope>

Example of http request (using soap example above in message.xml):

curl -X POST -H "Content-Type: application/soap+xml;charset=utf-8;action=urn:getInterestAndExchangeRates" --data-binary @message.xml http://swea.riksbank.se/sweaWS/services/SweaWebServiceHttpSoap12Endpoint

Supported calls

The following table lists supported calls in the API in alphabetical order, and provides a brief description for each. Click a call name to see syntax, usage, and more information for that call.

The calls getInterestAndExchangeGroupNames and getInterestAndExchangeNames are used to get hold of the names of groups and series (and their group IDs).
These methods return localized descriptions (Swedish or English) about the available groups and their series.

The calls are defined in the WSDL file referenced below.

Call Description
getAnnualAverageExchangeRates() Retrieves annual averages for exchange rates
getInterestAndExchangeRates() Retrieves interest and/or exchange rates data
getLatestInterestAndExchangeRates() Retrieves the latest observation value(s) for selected series ID(s)
getCalendarDays() Retrieves calendar dates with bank day information.
getCrossRates() Retrieves cross rates series data
getAllCrossNames() Retrieves the available cross rates series
getMonthlyAverageExchangeRates() Retrieves monthly averages for exchange rates
getInterestAndExchangeGroupNames() Retrieves all groups available in the database
getInterestAndExchangeNames() Retrieves all series for a particular group

WSDL and XSD

The WSDL file and matching xsd file can be found here:

File Description
sweaWS.wsdl WSDL file describing the webservice methods and endpoint location.
swea.xsd XSD file defining the data types. Referenced by the WSDL file above.