Module: IEX::Endpoints::KeyStats

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

Instance Method Summary collapse

Instance Method Details

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


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

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