Live data from Hacker News

Show HN: A free, lightweight static page to get stock quotes using the IEX API

github.com

11–20 of 42 posts

Re: Show HN: A free, lightweight static page to get stock quotes using the IEX API

#11
post #7

Looks like it gets an html page from " rel="nofollow">https://iextrading.com/apps/stocks/#/ then scrapes it. Not really an API. Edit: ok, I'm wrong.

It uses the iex api. I have used the api before its really good.

Here is the code author uses to get data:

      const BASE_URL = 'https://api.iextrading.com/1.0/stock/market/batch';

        let url = `${BASE_URL}?types=quote&symbols=${symbols.join(',')}&filter=${filters.join(',')}`;

Re: Show HN: A free, lightweight static page to get stock quotes using the IEX API

#13
post #7

Looks like it gets an html page from " rel="nofollow">https://iextrading.com/apps/stocks/#/ then scrapes it. Not really an API. Edit: ok, I'm wrong.

That url is just used to build a link. It uses api.iextrading.com for the quote data

Re: Show HN: A free, lightweight static page to get stock quotes using the IEX API

#16
post #9

There's definitely something I can learn from this. By the way, Robinhood API also gives you quotes for free https://api.robinhood.com/quotes/?symbols=AMD,TSLA

I believe Robinhood doesn't have official API support so use it with caution.

Re: Show HN: A free, lightweight static page to get stock quotes using the IEX API

#17
One thing I've taken away from this is vanilla Javascript seems to have come a long way, or I've just never taken the time to fully appreciate all the features

For example I didn't even realise JS supported string interpolation

https://github.com/toddwschneider/stocks/blob/master/index.h...

Re: Show HN: A free, lightweight static page to get stock quotes using the IEX API

#18
post #16
post #9

There's definitely something I can learn from this. By the way, Robinhood API also gives you quotes for free https://api.robinhood.com/quotes/?symbols=AMD,TSLA

I believe Robinhood doesn't have official API support so use it with caution.

According to their site, they'll have an official API in the "near future", and hopefully one that allows trades to be placed. Granted, they've said that for almost two years now. I fully expect to die of old age before it's available.

https://support.robinhood.com/hc/en-us/articles/210216823-Ro...

Re: Show HN: A free, lightweight static page to get stock quotes using the IEX API

#19

What makes this a "static page"? It's all non-interactive javascript.

Static doesn’t mean no JavaScript or interaction. In fact many SPAs are just static pages served out of S3 and connecting directly to some API server to fetch data.

A static page means no processing is done on a web server to serve you the rendered content. This saves you time and money, and ensures scalability for any amount of traffic.

Re: Show HN: A free, lightweight static page to get stock quotes using the IEX API

#20
Very cool!

As everything is done client side how about adding some parsing of the URL #hash/?query to encode data of a portfolio? That way you could have a single statically hosted version serving multiple people. Could even have a portfolio builder page that generates the encoded URL.

Post reply on HN