FexrYahoo v0.2.3 FexrYahoo View Source

Documentation for FexrYahoo.

Link to this section Summary

Functions

Gets the exchange rate. an options is provided to select symbols, default is set to all available symbols

Gets the exchange rate. Raises on error

Lists all available symbols

Link to this section Functions

Link to this function rates(base, symbols \\ []) View Source
rates(String.t | atom, [String.t | atom]) ::
  {:ok, map} |
  {:error, any} |
  no_return

Gets the exchange rate. an options is provided to select symbols, default is set to all available symbols

Symbols

  • if used only returns exchange rates for the selected symbols

Examples

iex> FexrYahoo.rates("USD", ["EUR"])
#=> {:ok, %{"EUR" => 0.8491}}

iex> FexrYahoo.rates(:USD, [:EUR])
#=> {:ok, %{"EUR" => 0.8491}}
Link to this function rates!(base, symbols \\ []) View Source
rates!(String.t | atom, [String.t | atom]) :: map | term

Gets the exchange rate. Raises on error.

Symbols

  • if used only returns exchange rates for the selected symbols

Examples

iex> FexrYahoo.rates("USD", ["EUR"])
#=> %{"EUR" => 0.8491}

iex> FexrYahoo.rates(:USD, [:EUR])
#=> %{"EUR" => 0.8491}
Link to this function symbols(options \\ [as: :string]) View Source
symbols([{:as, atom}]) :: [String.t] | [atom]

Lists all available symbols

  • option defults to [as: :string]

    • :string
    • :atom