Class: YQuotes::Client
- Inherits:
-
Object
- Object
- YQuotes::Client
- Defined in:
- lib/yquotes.rb
Instance Method Summary collapse
-
#get_quote(ticker, start_date = nil, end_date = nil, period = 'd') ⇒ Object
(also: #historical_data, #historical_quote)
get_quote: returns Daru::DataFrame of the quote with volume and close.
-
#initialize ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize ⇒ Client
11 12 13 |
# File 'lib/yquotes.rb', line 11 def initialize @yahoo_client = Yahoo.new end |
Instance Method Details
#get_quote(ticker, start_date = nil, end_date = nil, period = 'd') ⇒ Object Also known as: historical_data, historical_quote
get_quote: returns Daru::DataFrame of the quote with volume and close
16 17 18 19 |
# File 'lib/yquotes.rb', line 16 def get_quote(ticker, start_date=nil, end_date=nil, period='d') csv = @yahoo_client.get_csv(ticker, start_date, end_date, period) create_from_csv(csv) end |