Skip to content

sosna/sdmx-rest4js

Repository files navigation

sdmx-rest4js

Build codecov.io CodeFactor Known Vulnerabilities semantic-release current version Mentioned in Awesome Official Statistics

This library allows to create and execute SDMX REST queries using JavaScript.

In a nutshell, you can:

The example below shows how to execute a query against the ECB service, with the request function.

var sdmxrest = require('sdmx-rest');

var query = {flow: 'EXR', key: 'A.CHF.EUR.SP00.A'};

sdmxrest.request(query, 'ECB') // ECB is one of the predefined services

  .then(function(data) {console.log(data)})
  .catch(function(error){console.log("something went wrong: " + error)});

This library is compliant with both SDMX 2.1 and SDMX 3.0.

For more information and examples, check the Wiki.