Module: IEX::Endpoints::Quote

Included in:
Api::Client
Defined in:
lib/iex/endpoints/quote.rb

Instance Method Summary collapse

Instance Method Details

#quote(symbol, options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/iex/endpoints/quote.rb', line 4

def quote(symbol, options = {})
  IEX::Resources::Quote.new(get("stock/#{symbol}/quote", options))
rescue Faraday::ResourceNotFound => e
  raise IEX::Errors::SymbolNotFoundError.new(symbol, e.response[:body])
end