Live data from Hacker News

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

github.com

31–40 of 42 posts

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

#31

hmm, while this is cool i am not sure if it is a full-fledged replacement for the Google Finance "portfolios" feature. That lets you add the number of stocks you own for each symbol and shows you an aggregate gain/loss per day, etc. That was the main reason i was using google finance. I have now transitioned to my own Google Sheet with the "=GOOGLEFINANCE()" function for getting the stock data. Works pretty well.

I'm no JS expert by any stretch but it seems pretty simple to add in code for that here. It'd be a chore to hard-code a big portfolio or one that trades frequently, though.

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

#33

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

There's some really good examples of this in Wes Bos' (free) javascript30.com course - 30 short videos all using vanilla Javascript and showing some really neat new features. Another really awesome new feature which I can't remember if it's in that course or not, is fetch - super simple AJAX API using promises. It's also used in this app: https://github.com/toddwschneider/stocks/blob/master/index.h...

I didn't know about fetch, that's pretty neat. Unfortunately for me, it isn't supported on IE: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

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

#34
post #33

Earlier quoted context omitted.

There's some really good examples of this in Wes Bos' (free) javascript30.com course - 30 short videos all using vanilla Javascript and showing some really neat new features. Another really awesome new feature which I can't remember if it's in that course or not, is fetch - super simple AJAX API using promises. It's also used in this app: https://github.com/toddwschneider/stocks/blob/master/index.h...

I didn't know about fetch, that's pretty neat. Unfortunately for me, it isn't supported on IE: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

Fortunately, there is a very good polyfill[0] for it.

[0]: https://github.com/github/fetch

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

#35
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

More info is always fun but I gotta point out:

Why would you? Their volume is likely a fraction of IEX's:

https://markets.cboe.com/us/equities/market_share/

Worse all their stuff is effectively darkpooled. You'd be hard-pressed to find a worse source of market data.

Also:

https://medium.com/@Gangal/robinhood-robbing-from-the-poor-g...

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

#37
post #35
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

More info is always fun but I gotta point out: Why would you? Their volume is likely a fraction of IEX's: https://markets.cboe.com/us/equities/market_share/ Worse all their stuff is effectively darkpooled. You'd be hard-pressed to find a worse source of market data. Also: https://medium.com/@Gangal/robinhood-robbing-from-the-poor-g...

Robinhood isn't a darkpool - they sell their "dumb" retail flow to the highest bidder wholesale to the likes of Citadel, Virtus, UBS, etc.. etc... Usually they just pick 1. This type of flow is called "PFOF" (pay for order flow). These PFOF players also provide marginal price improvement over the NBBO... marginal - because they always make more money than they pay out - and take marginal risk.

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

#38
post #37
post #35

Earlier quoted context omitted.

More info is always fun but I gotta point out: Why would you? Their volume is likely a fraction of IEX's: https://markets.cboe.com/us/equities/market_share/ Worse all their stuff is effectively darkpooled. You'd be hard-pressed to find a worse source of market data. Also: https://medium.com/@Gangal/robinhood-robbing-from-the-poor-g...

Robinhood isn't a darkpool - they sell their "dumb" retail flow to the highest bidder wholesale to the likes of Citadel, Virtus, UBS, etc.. etc... Usually they just pick 1. This type of flow is called "PFOF" (pay for order flow). These PFOF players also provide marginal price improvement over the NBBO... marginal - because they always make more money than they pay out - and take marginal risk.

Do they not match transactions internally first?

Hence when they launched the terrible execution - not enough internal counterparties.

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

#39

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

... and I didn't realize that one could link to a specific line in code on a github file like you've done...

    index.html#L111
in

  https://github.com/toddwschneider/stocks/blob/master/index.html#L111

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

#40
post #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.

Here you go! No need to fork :)

https://samdobson.github.io/stocks/?Banks=GS,MS,JPM&Tech=AAP...

Post reply on HN