Example: retrieve ECB exchange rates via API

Here is a practical example that retrieves the currency exchange rates for a specified date range from the free public API of the ECB (European Central Bank).

The API returns a quite complex JSON with very questionable design choices. Nevertheless, it can be successfully parsed with EasyMorph into a flat table.

The example can be interesting because it demonstrates a number of useful techniques:

  • Designing a complex HTTP request
  • Advanced JSON parsing
  • Appending tables side-to-side
  • Idiomatic use of the "Either table" action
  • Multi-format export to a file
  • Use of the parameters of the "Fixed list" type
  • Use of the "To-do" action

The example works out of the box and is recommended to people who already have some experience with EasyMorph and want to learn more advanced techniques. It might be too difficult for beginners.

ecb-rates-example.morph (12.1 KB)