Module: IEX::Resources::OHLC

Defined in:
lib/iex/resources/ohlc.rb,
lib/iex/resources/ohlc/base.rb,
lib/iex/resources/ohlc/timed_price.rb

Defined Under Namespace

Classes: Base, TimedPrice

Class Method Summary collapse

Class Method Details

.get(stock_symbol) ⇒ Object


7
8
9
10
11
12
# File 'lib/iex/resources/ohlc.rb', line 7

def self.get(stock_symbol)
  IEX::Resources::Base.symbol(stock_symbol) do
    resource = IEX::Api::OHLC.get(stock_symbol)
    OHLC::Base.new resource
  end
end

.marketObject


14
15
16
17
18
19
20
# File 'lib/iex/resources/ohlc.rb', line 14

def self.market
  IEX::Resources::Base.symbol(nil) do
    Hash[IEX::Api::OHLC.market.map do |k, v|
      [k, OHLC::Base.new(v)]
    end]
  end
end