The Forex.Fetcher module is responsible for fetching the exchange rates
from the cache or the feed on periodic intervals or on demand.
The exchange rates are fetched from the cache if the cache is enabled and the cache is not stale. Otherwise, the exchange rates are fetched from the feed and stored in the cache.
By default, the exchange rates are fetched from the feed every 12 hours as
the European Central Bank (ECB) updates the reference rates at around 16:00 CET
every working day. This can be configured by setting the :schedular_interval
option in the Forex application environment or by passing it as an option
when starting the Forex.Fetcher process.
Summary
Functions
Returns a specification to start this module under a supervisor.
Fetch the respective exchange rates from the cache or the feed,
based on the key and the opts.
Get the options used to start the Forex.Fetcher process.
Returns the default options for the Forex.Fetcher process.
Start the Forex.Fetcher process with the given options.
Start the Forex.Fetcher process linked to the current process
with the given options.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Fetch the respective exchange rates from the cache or the feed,
based on the key and the opts.
The key can be one of the following atoms:
:latest_rates- Fetch the latest exchange rates.:last_ninety_days_rates- Fetch the exchange rates for the last 90 days.:historic_rates- Fetch the exchange rates for a specific date.
Options
Get the options used to start the Forex.Fetcher process.
Returns the default options for the Forex.Fetcher process.
Start the Forex.Fetcher process with the given options.
Options
Start the Forex.Fetcher process linked to the current process
with the given options.