API for stock market data lookup?

时间:2018-03-22 23:29:58

标签: javascript google-apps-script google-sheets google-apps

I'm creating a program in Google Apps Script which will allow for the automated creation and maintenance of one or more stock market portfolios using Google Sheets (see here for more on that).

The issue I'm having is that I want one of the checks when submitting a new stock to the portfolio to check whether or not the ticker they submit actually exists (e.g. if they bought 100 shares of GOOG but accidentally typed in FOOH, a ticker that doesn't exist).

The problem here is that the only way to check that the ticker they entered in is actually valid requires either (1) a full list of every single stock, ETF, mutual fund, etc. on the market (which I'd definitely prefer to avoid) or (2) to use some sort of API that allows for the lookup of specific stocks by their ticker. The Google Finance API or Yahoo Finance API would have probably worked for this purpose if it weren't for the fact that they have been deprecated for years now. Ideally the API should also be able to look up a company's sector, as that is another issue I have been having trouble resolving.

I have yet to find an API that I believe would do this effectively (or work at all in Google Apps Script).

Help would be greatly appreciated!

0 个答案:

没有答案