API Reference Forex v#1.1.2

Copy Markdown View Source

Modules

Forex is a simple Elixir library that serves as a wrapper to the foreign exchange reference rates provided by the European Central Bank, no API keys, no authentication, no rate limits.

Since the ECB reference rates are usually updated at around 16:00 CET every working day we should cache the response.

Implementation of the Forex.Cache behaviour using DETS.

Implementation of the Forex.Cache behaviour using ETS.

This module provides curreny information and utility functions.

Exception for currency errors.

Exception for date errors.

This module is responsible for fetching the latest exchange rates from the European Central Bank (ECB) and parsing the XML response.

This module is responsible for defining the behaviour of the feed (HTTP) client.

This module defines the behaviour of the parser that will be used to parse the XML response from the European Central Bank (ECB).

The default HTTP API module for fetching the exchange rates from the European Central Bank (ECB). It implements the Forex.Feed.API behaviour and it uses Req as the HTTP client.

This module implements the Forex.Feed.Parser behaviour using the SweetXml library.

Exception for feed errors.

The Forex.Fetcher module is responsible for fetching the exchange rates from the cache or the feed on periodic intervals or on demand.

Supervisor for the Forex.Fetcher module that fetches exchange rates.

Exception for format errors.

Options/configuration module for the Forex.Fetcher.Supervisor and the rates functions (latest_rates/1, last_ninety_days_rates/1, etc.) in the Forex module.

The Forex.Support module provides helper functions, for example, for formatting the exchange rates values.

Mix Tasks

Prints Forex tasks and their information.

Fetch and export the historic exchange rates from the European Central Bank to a file.

Fetch and export the latest exchange rates from the European Central Bank to a file.

Fetch and export the last ninety days exchange rates from the European Central Bank to a file.