lib/iex/endpoints/ohlc.rb in iex-ruby-client-1.1.0 vs lib/iex/endpoints/ohlc.rb in iex-ruby-client-1.1.1

- old
+ new

@@ -1,15 +1,15 @@ module IEX module Endpoints module Ohlc def ohlc(symbol, options = {}) - IEX::Resources::OHLC.new(get("stock/#{symbol}/ohlc", options)) + IEX::Resources::OHLC.new(get("stock/#{symbol}/ohlc", { token: publishable_token }.merge(options))) rescue Faraday::ResourceNotFound => e raise IEX::Errors::SymbolNotFoundError.new(symbol, e.response[:body]) end def market(options = {}) - Hash[get('stock/market/ohlc', options).map do |k, v| + Hash[get('stock/market/ohlc', { token: publishable_token }.merge(options)).map do |k, v| [k, IEX::Resources::OHLC.new(v)] end] end end end