SoftBank.ExchangeRates.CoinMarketCap.Retriever.historic_rates

You're seeing just the function historic_rates, go back to SoftBank.ExchangeRates.CoinMarketCap.Retriever module for more information.

Forces retrieval of historic exchange rates for a single date

  • date is a date returned by Date.new/3 or any struct with the elements :year, :month and :day or

  • a Date.Range.t created by Date.range/2 that specifies a range of dates to retrieve

Returns:

  • {:ok, rates} if exchange rates request is successfully sent.

  • {:error, reason} if the request cannot be send.

Sends a message ot the exchange rate retrieval worker to request historic rates for a specified date or range be retrieved and stored.

This function does not return exchange rates, for that see Money.ExchangeRates.latest_rates/0 or Money.ExchangeRates.historic_rates/1.

Link to this function

historic_rates(from, to)

View Source

Forces retrieval of historic exchange rates for a range of dates

  • from is a date returned by Date.new/3 or any struct with the elements :year, :month and :day.

  • to is a date returned by Date.new/3 or any struct with the elements :year, :month and :day.

Returns:

  • {:ok, rates} if exchange rates request is successfully sent.

  • {:error, reason} if the request cannot be send.

Sends a message to the exchange rate retrieval process for each date in the range from..to to request historic rates be retrieved.