module IEX::Endpoints::Price

Public Instance Methods

price(symbol, options = {}) click to toggle source
# File lib/iex/endpoints/price.rb, line 4
def price(symbol, options = {})
  get("stock/#{symbol}/price", { token: publishable_token }.merge(options))
rescue Faraday::ResourceNotFound => e
  raise IEX::Errors::SymbolNotFoundError.new(symbol, e.response[:body])
end