Closed clay-reed-a closed 6 years ago
@clay-reed-a Looks like Google doesn't recognize the symbol "Z", and instead of returning a normal formatted response is returning a response containing suggestions. I am going to update the gem to accommodate the additional response instead of crashing, but I wanted to let you know what the issue was.
@tyrauber I have found the issue and am submitting a pull request. It actually isn't about the symbol Z but about the leading "// " we see when we get more than one result back.
Whoops, already worked up a solution, 827d3b7f6897c2628a49105045040cc51af751ce. Want to let me know if that resolves your issue before I push our a 1.5.3?
Hey @tyrauber, Left a comment on why that might not be quite what you're looking for.
I'm looking more deeply into it and I don't think it's an unknown symbol but an ambiguous symbol. Take the response for "NI"
as an example. That returns one of these searchresults
lists, but if I take the exchange from the first "NI"
in that searchresults
list and go StockQuote.quote
"NI:NYSE"
then I get what I'm after.
Hmm, updating the documentation to suggest that format, "Symbol:Exchange" would suffice?
Closing this issue due to an API change to IEX (see #55). Not sure what the outcome of this change is for this specific issue is. Feel free to re-open is necessary in regards to version 2.0.0.
It seems like
StockQuote::Stock.quote
can't parse the JSON from a number of the response it's getting back. I tried this on Linux and then again on a Mac, a couple different Ruby versions too. Currently on 2.1.4, but tried latest stable as well.For examples of symbols that seem to provoke this issue, please see:
Can't quite figure out what exactly it's objecting to in the response, the output is rather large but also incomplete.
All of them seem to start:
'tart" : "",
.