Module: IEX::Endpoints::LargestTrades

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

Instance Method Summary collapse

Instance Method Details

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



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

def largest_trades(symbol, options = {})
  get("stock/#{symbol}/largest-trades", options).map do |data|
    IEX::Resources::LargestTrades.new(data)
  end
rescue Faraday::ResourceNotFound => e
  raise IEX::Errors::SymbolNotFoundError.new(symbol, e.response[:body])
end