Class: Arbolito::Exchange::YahooFinance

Inherits:
Object
  • Object
show all
Defined in:
lib/arbolito/exchange/yahoo_finance.rb

Class Method Summary collapse

Class Method Details

.find_current_rate(quote) ⇒ Object

DEPRECATED Yahoo Finance is not supported anymore by Yahoo so use Alpha Vantage API



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/arbolito/exchange/yahoo_finance.rb', line 8

def find_current_rate(quote)
  warn "[DEPRECATION] Yahoo Finance `find_current_rate` is deprecated.  Please use AlphaVantage `find_current_rate` instead."
  data = response(build_uri(quote))

  values = {
    quote: quote,
    price: data[1],
  }

  build_rate(values)
end