# `Forex.Options`
[🔗](https://github.com/greven/forex/blob/1.1.2/lib/forex/options.ex#L1)

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.

# `currency_option`

```elixir
@type currency_option() :: {:format, term()} | {:round, integer() | nil}
```

# `fetcher_option`

```elixir
@type fetcher_option() ::
  {:use_cache, boolean()}
  | {:feed_fn, {module(), atom(), [term()]}}
  | {:schedular_interval, integer()}
```

# `fetcher_supervisor_option`

```elixir
@type fetcher_supervisor_option() :: {:auto_start, boolean()}
```

# `rates_option`

```elixir
@type rates_option() ::
  {:base, term()}
  | {:format, term()}
  | {:round, integer() | nil}
  | {:keys, term()}
  | {:symbols, [term()] | nil}
  | {:use_cache, boolean()}
  | {:feed_fn, {module(), atom(), [term()]}}
```

# `currency_options`

```elixir
@spec currency_options(opts :: keyword()) ::
  validated_options :: [currency_option()] | map()
```

Validate and return the options for the Forex.Currency module functions.

Supported options:
* `:format` - Format of rate values The default value is `:decimal`.

* `:round` - Decimal places for rounding The default value is `5`.

# `currency_schema`

# `fetcher_options`

```elixir
@spec fetcher_options(opts :: keyword()) ::
  validated_options :: [fetcher_option()] | map()
```

Validate and return the options for the Forex.Fetcher module functions.
Supported options:
* `:use_cache` (`t:boolean/0`) - Whether to use cached rates The default value is `true`.

* `:feed_fn` - Optional custom feed function as `{module, function, args}`

* `:schedular_interval` (`t:integer/0`) - Interval for the scheduler to fetch rates The default value is `43200000`.

# `fetcher_schema`

# `fetcher_supervisor_options`

```elixir
@spec fetcher_supervisor_options(opts :: keyword()) ::
  validated_options :: [fetcher_supervisor_option()] | map()
```

Validate and return the options for the Forex.Fetcher.Supervisor module functions.
Supported options:
* `:auto_start` (`t:boolean/0`) - Whether to start the fetcher automatically The default value is `true`.

# `fetcher_supervisor_schema`

# `rates_options`

```elixir
@spec rates_options(opts :: keyword()) ::
  validated_options :: [rates_option()] | map()
```

Validate and return the options for the Forex module functions.

Supported options:
* `:base` - The base currency to convert rates to The default value is `:eur`.

* `:format` - Format of rate values The default value is `:decimal`.

* `:round` - Decimal places for rounding The default value is `5`.

* `:keys` - Map key format The default value is `:atoms`.

* `:symbols` - Currency codes to include

* `:use_cache` (`t:boolean/0`) - Whether to use cached rates The default value is `true`.

* `:feed_fn` - Optional custom feed function as `{module, function, args}`

# `rates_schema`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
