Money.ExchangeRates.OpenExchangeRates.get_latest_rates

You're seeing just the function get_latest_rates, go back to Money.ExchangeRates.OpenExchangeRates module for more information.
Link to this function

get_latest_rates(config)

View Source

Specs

get_latest_rates(Money.ExchangeRates.Config.t()) ::
  {:ok, map()} | {:error, String.t()}

Retrieves the latest exchange rates from Open Exchange Rates site.

  • config is the retrieval configuration. When invoked from the exchange rates services this will be the config returned from Money.ExchangeRates.config/0

Returns:

  • {:ok, rates} if the rates can be retrieved

  • {:error, reason} if rates cannot be retrieved

Typically this function is called by the exchange rates retrieval service although it can be called outside that context as required.