Linked Data Currency Exchange Rates
Currency Exchange Rates for Linked Data

Linked Data Currency Exchange Rates is a service for bringing currency exchange rates to the Web of Linked Data. The service is based on the Exchange Rate Ontology (XRO) and Currency Conversion of Google Calculator service.

What is this page about?

This page is the human-readable description of currency exchange rates. Using this page's URI with respective media types will give you a machine-readable RDF representation of all possible exchange rates as of 08.12.2016.

curl -H "Accept: text/n3" http://www.currency2currency.org/20161208

How to take advantage?

a) This service understands several URI patterns serving different purposes, i.e.

  1. Provide the exchange rate between two given currencies (current or daily snapshot)
    • http://www.currency2currency.org/ISO_4217/ISO_4217
    • http://www.currency2currency.org/ISO_4217/ISO_4217/YYYYMMDD
    Examples:
  2. List all exchange rates with respect to a given base currency (current or daily snapshot)
    • http://www.currency2currency.org/ISO_4217
    • http://www.currency2currency.org/ISO_4217/YYYYMMDD
    Examples:
  3. List all available exchange rates (current or daily snapshot)
    • http://www.currency2currency.org
    • http://www.currency2currency.org/YYYYMMDD
    Examples:

b) The following list shows the three-letter currency codes (ISO 4217) currently supported by this service

AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HRK HUF IDR ILS INR JPY KRW MXN MYR NOK NZD PHP PLN RON RUB SEK SGD THB TRY USD ZAR

c) You can obtain various formats of the exchange rates using HTTP Content Negotiation with the following media types for

  • RDF/XML
    Accept: application/rdf+xml
  • N3
    Accept: text/n3
  • Turtle
    Accept: text/turtle
  • JSON
    Accept: application/json
  • N-Triples
    Accept: text/plain

Example in SPARQL

The following example, formulated in SPARQL, shows how the exchange rates can be used for currency conversions on GoodRelations data. For the sake of this example, we assume the following data sources to be already readily available in the endpoint: a snapshot of currency exchange rates, currency instances from DBPedia, and offers with price specifications in GoodRelations.

PREFIX gr: <http://purl.org/goodrelations/v1#>
PREFIX xro: <http://purl.org/xro/ns#>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX dbpprop: <http://dbpedia.org/property/>
 
SELECT DISTINCT ?price ?code (?price/?rate AS ?base_price) ?base_code
WHERE {
  ?s a gr:Offering;
    gr:hasPriceSpecification ?pspec .
  ?pspec gr:hasCurrency ?code;
    gr:hasCurrencyValue ?price .
  ?xrate xro:rate ?rate;
    xro:base ?base_currency;
    xro:counter ?counter_currency .
  ?base_currency dbpprop:isoCode ?base_code .
  ?counter_currency dbpprop:isoCode ?counter_code .
  FILTER(str(?counter_code) = str(?code) && str(?base_code) = "USD" && str(?base_code) != str(?code))
}
ORDER BY ?base_price

License and Source Code

The source code of this tool will be made available under a LPGL license from here.

Contact

Univ.-Prof. Dr. Martin Hepp
E-Business and Web Science Research Group, Chair of General Management and E-Business
Universität der Bundeswehr München
Werner-Heisenberg-Weg 39
D-85579 Neubiberg, Germany

Phone: +49-89-6004-4217
E-mail: tools (at) ebusiness-unibw.org
http://www.unibw.de/ebusiness/

Publications

Alex Stolz and Martin Hepp: Currency Conversion the Linked Data Way, in: Proceedings of the Workshop on Services and Applications over Linked APIs and Data (SALAD2013), in conjunction with the 10th Extended Semantic Web Conference (ESWC 2013), May 26-30, Montpellier, France.

Acknowledgements

This tool has been developed by Alex Stolz, a member of the E-Business and Web Science Research Group at Universität der Bundeswehr München. The author would like to thank Martin Hepp for constructive feedback and ongoing substantial contributions to this project.

The work on "Linked Data Currency Exchange Rates" has been supported by the German Federal Ministry of Education and Research (BMBF) by a grant under the KMU Innovativ program as part of the Intelligent Match project (FKZ 01IS10022B).