tyrauber / stock_quote

A ruby gem that retrieves stock quotes from IEX
MIT License
210 stars 57 forks source link

Invalid symbols #27

Closed georgepiva closed 7 years ago

georgepiva commented 8 years ago

The #json_quote method returns quotes with valid symbols.

irb(main):016:0> StockQuote::Stock.json_quote('AAPL, MSFT, GOOG', nil, nil, ['Symbol', 'LastTradePriceOnly'])
=> {"quote"=>[{"LastTradePriceOnly"=>"105.68", "Symbol"=>"AAPL"}, {"LastTradePriceOnly"=>"51.78", "Symbol"=>"MSFT"}, {"LastTradePriceOnly"=>"718.77", "Symbol"=>"GOOG"}]}

But the #quote method returns quotes without valid symbols.

irb(main):017:0> StockQuote::Stock.quote('AAPL, MSFT, GOOG', nil, nil, ['Symbol', 'LastTradePriceOnly'])
=> [#<StockQuote::Stock:0x007fff431e8440 @response_code=200, @symbol="'AAPL','MSFT','GOOG'", @last_trade_price_only=105.68>, #<StockQuote::Stock:0x007fff431e80a8 @response_code=200, @symbol="'AAPL','MSFT','GOOG'", @last_trade_price_only=51.78>, #<StockQuote::Stock:0x007fff431f2648 @response_code=200, @symbol="'AAPL','MSFT','GOOG'", @last_trade_price_only=718.77>]
tyrauber commented 7 years ago

Sorry for the delay on this. Thanks for the details. Resolved in version 1.2.6.