I am not sure if the project should be done, because of google restrictions.
I am hope of npm google finance should I used it?
var url= 'https://finance.google.com/finance/info'
// console.log(JSON.stringify(req.query.stock))
request.post({url:url+'?q=NASDAQ%3a'+req.query.stock , json: true} ,function(reqest,response){
console.log( response.body)}
//res.send(response.body)
)
Sorry... body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
This challenge is broken currently - the example doesn’t work at all. Partly the issue is that Google no longer supports the API, but there are also bits of other projects left in the starting point that mess it up.
You can do it, but you need to work more from scratch than on the other projects. I ended up using google-finance-data, but it is fearfully slow. You’ll need to fiddle around with test settings to get it all to work.
On the upside, I found that I learnt a lot of different things from getting this challenge to function.
Here’s my basically working version if you want to have a look.
2 Likes
You’ve got bad links - the correct call should be /api/stock-prices?stock=goog
On the example, that doesn’t work - if you use the front-end, nothing happens, and if you go directly to the page, you get an error message.
1 Like
Yeah, for some reason google-finance-data only ever returns NaN for google stock prices. It works for other stocks. I also tried using Alphavantage’s API, which is good, but rate-limited.
Hi, I don’t know if it’s too late, but I just finished my project with the Alpha Vantage’s api: https://www.alphavantage.co/. It is free, and I think I could completed all the user stories so far.
This is the link to my finished project: https://isqa-fcc-stock-price-checker.glitch.me/
Hi!
I had troubles with the fallen-Google-Finance-API too, and searching how to fix it, i found this API:
https://iextrading.com/developer/
It’s FREE, it’s Open, it’s very simple, it’s real time, has no limits, and it’s relative fast.
For Stock Prices, it’s simple
https://api.iextrading.com/1.0/stock/STOCK_NAME/price
But it has more options if you want to explore…
11 Likes
thanks @gastonpereyra! I thought I was going to hit a dead end on this one. this API is pretty sweet!
1 Like