node-google-finance icon indicating copy to clipboard operation
node-google-finance copied to clipboard

Historical module stopped working

Open nmarra opened this issue 6 years ago • 6 comments

I've been using the google-finance module for historical queries for about a year now and yesterday (March 19th) it stopped working. It was working fine on Friday ( March 16th ). I get no errors just a bunch of empty values. My query looks like: googleFinance.historical({ symbols: SYMBOLS, from: DATE, to: DATE, }, function (err, result) { // do something with result } The result prints out all of the stock symbols I passed in with [] as the result. SYMBOLS is an array of stock symbols and DATE is a single date object in the past.

nmarra avatar Mar 21 '18 04:03 nmarra

Company News API returns empty array as well.

tverskih avatar Mar 21 '18 09:03 tverskih

it seems like google just removed the api endpoint.

thstarshine avatar Mar 22 '18 04:03 thstarshine

@thstarshine nope, rss is fine but changed a bit so parser of google-finance throws an error. Still debugging to see what's the problem.

tverskih avatar Mar 22 '18 14:03 tverskih

Has anyone managed to get this to work again? I use it for getting historical prices .. did you find a solution @tverskih ?

kjohannessen avatar Mar 30 '18 13:03 kjohannessen

@kjohannessen google-finance uses feedparser library to parse rss. I've tested the latest version of feedparser with Google API and it does not work. So I just switched to yahoo finance API, using feedparser library only.

You can find en example of usage of feedparser on their page: https://github.com/danmactough/node-feedparser

I use news feed like that: http://finance.yahoo.com/rss/headline?s=%symbol

Probably you may find historical data on their API as well.

tverskih avatar Mar 30 '18 13:03 tverskih

@tverskih I have just switched back to the Yahoo Finance API as well .. luckily I have both sets of symbology in my security master .. thanks for the examples!!

kjohannessen avatar Mar 30 '18 14:03 kjohannessen