markitondemand / DEPRECATED-DataApis

Markit On Demand - Market Data APIs
http://dev.markitondemand.com
MIT License
178 stars 68 forks source link

GOOG returns GOOGLE #7

Closed jonwiley closed 10 years ago

jonwiley commented 10 years ago

http://dev.markitondemand.com/Api/v2/Quote/jsonp?symbol=GOOG&callback=myFunction

returns

myFunction({"Status":"SUCCESS","Name":"Google Inc","Symbol":"GOOGL","LastPrice":523.11,"Change":0.00999999999999091,"ChangePercent":0.00191168036705047,"Timestamp":"Fri Apr 25 15:59:00 UTC-04:00 2014","MSDate":41754.6659722222,"MarketCap":176417278170,"Volume":137611,"ChangeYTD":1120.71,"ChangePercentYTD":-53.3233396686029,"High":533.52,"Low":522.5,"Open":532.02})

markhealey commented 10 years ago

@jonwiley This particular lookup matches on symbol, partial name and partial company. It's a coincidence that GOOG and GOOGL are the first 4 and 5 letters of the company name and therefore Google (Nasqaq) appears in the results. In short, this is the expected result.

jonwiley commented 10 years ago

Expected even when GOOG and GOOGL are two different symbols with different prices? Google trades under both.

On Monday, April 28, 2014 3:33:04 AM, Mark Healey notifications@github.com wrote:

@jonwiley https://github.com/jonwiley This particular lookup matches on symbol, partial name and partial company. It's a coincidence that GOOGand GOOGL are the first 4 and 5 letters of the company name and therefore Google (Nasqaq) appears in the results. In short, this is the expected result.

— Reply to this email directly or view it on GitHubhttps://github.com/markitondemand/DataApis/issues/7#issuecomment-41543737 .

markhealey commented 10 years ago

Very sorry @jonwiley, I got crossed up on the API you were looking at—quote not lookup!

GOOG is the Class C share, GOOGL is the Class A share. I'm able to reproduce and I'd have to double check to be sure, but I think the issue is caused by the lookup preceding the snapquote request internal to the API. The lookup is using the first matched symbol versus the best match.

Wilm0r commented 10 years ago

This is still happening, I can't get data for GOOG from your API anymore, just keep getting GOOGL. :-(

markhealey commented 10 years ago

Hi @Wilm0r, this is a result of how the API was built a few years ago and we're unable to change it at this time. Looks like YQL has both GOOG and GOOGL for you.

Wilm0r commented 10 years ago

Thank you for the explanation. I'm looking for historical data which your API does very nicely, I'll see if YQL can do this then.

Found it, if anybody else cares (this bug is the first and only useful result for "markitondemand GOOG GOOGL"): http://developer.yahoo.com/yql/console/?q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20in%20(%22GOOG%22%2C%20%22GOOGL%22)%20and%20startDate%20%3D%20%222014-03-01%22%20and%20endDate%20%3D%20%222014-05-10%22&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys

markhealey commented 10 years ago

Sounds good. What are you building?

Wilm0r commented 10 years ago

Honestly, nothing exciting. :-) I'm keeping track of my finance with ledger http://www.ledger-cli.org/, and I need a data source to fill in its price database with exchange rates (I forgot what I use for that) and stock values, so it can keep track of how much the investment account is worth in GBP over time.

I could polish the scripts and publish them somewhere, but with ledger it looks like everybody just hacks up something that scratches their personal itches.