Live data from Hacker News

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

github.com

1–10 of 42 posts

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

#3
Neat! I used this API to live-code a mini-portfolio-manager SaaS a couple of months ago: https://anvil.works/blog/live-coding-stock-portfolio

It let you pick the stocks yourself, and showed you historical graphs too. It was a bit more complex than this, but still only took an hour.

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

#6

I would like to find something like this that is usable by Libreoffice Calc.

It looks like a simple html table, I think LibreOffice might be able to parse that. Else, it should be relatively trivial to change the output to e.g. csv which can be imported.

As for an alternative, and I don't know the options here, but maybe a plugin could be made that pulls the data into Calc itself.

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

#8
This is great. I love the simple, succinct interface — I wish real financial companies like my trading account and my bank had even half this much sense when it comes to pragmatic design.

A few notes from taking a look at the code:

* I've very much started doing the same thing in my projects of just using modern JavaScript constructs like fetch and arrow functions without a transpiler. IE is never going to support any of them, but I've accepted that. Caniuse.com ranks most of them at 85%+ supported.

* It's neat to see that the IEX API supports batch requests (as opposed to having to pull one stock at a time) in its API which makes it possible to implement the project efficiently and in a way that doesn't have to store state.

* Nice work building it to support large users as well. A lot of installations probably won't have more than 100 stocks, but it'll break up requests into multiple batches of <= 100 if they do.

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

#10
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.

You might want to look at the code, serve that html page from your local machine and console.log(url) inside the updateDataForBatch(symbols, addTitle) function to see how it works.
Post reply on HN