TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

207 pointsby lil_teeabout 7 years ago

15 comments

djhworldabout 7 years ago
One thing I&#x27;ve taken away from this is vanilla Javascript seems to have come a long way, or I&#x27;ve just never taken the time to fully appreciate all the features<p>For example I didn&#x27;t even realise JS supported string interpolation<p><a href="https:&#x2F;&#x2F;github.com&#x2F;toddwschneider&#x2F;stocks&#x2F;blob&#x2F;master&#x2F;index.html#L111" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;toddwschneider&#x2F;stocks&#x2F;blob&#x2F;master&#x2F;index.h...</a>
评论 #16960672 未加载
评论 #16960206 未加载
评论 #16961244 未加载
评论 #16959829 未加载
评论 #16969459 未加载
meredyddabout 7 years ago
Neat! I used this API to live-code a mini-portfolio-manager SaaS a couple of months ago: <a href="https:&#x2F;&#x2F;anvil.works&#x2F;blog&#x2F;live-coding-stock-portfolio" rel="nofollow">https:&#x2F;&#x2F;anvil.works&#x2F;blog&#x2F;live-coding-stock-portfolio</a><p>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.
dxxviabout 7 years ago
There&#x27;s definitely something I can learn from this. By the way, Robinhood API also gives you quotes for free <a href="https:&#x2F;&#x2F;api.robinhood.com&#x2F;quotes&#x2F;?symbols=AMD,TSLA" rel="nofollow">https:&#x2F;&#x2F;api.robinhood.com&#x2F;quotes&#x2F;?symbols=AMD,TSLA</a>
评论 #16959473 未加载
评论 #16963098 未加载
janvidarabout 7 years ago
What makes this a &quot;static page&quot;? It&#x27;s all non-interactive javascript.
评论 #16959326 未加载
评论 #16959694 未加载
brandurabout 7 years ago
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.<p>A few notes from taking a look at the code:<p>* I&#x27;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&#x27;ve accepted that. Caniuse.com ranks most of them at 85%+ supported.<p>* It&#x27;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&#x27;t have to store state.<p>* Nice work building it to support large users as well. A lot of installations probably won&#x27;t have more than 100 stocks, but it&#x27;ll break up requests into multiple batches of &lt;= 100 if they do.
mmanfrinabout 7 years ago
I had not realized Google killed Google Finance until this post -- the search replacement is abysmal.
indescions_2018about 7 years ago
Looks good! IEX API also has experimental support for websockets ;)
roadbeatsabout 7 years ago
I&#x27;m not into stocks, but like the way you coded it. We don&#x27;t see this sort of good examples that combines the old school simplicity and new JS &#x2F; DOM API features.
vigneshv_psgabout 7 years ago
hmm, while this is cool i am not sure if it is a full-fledged replacement for the Google Finance &quot;portfolios&quot; feature. That lets you add the number of stocks you own for each symbol and shows you an aggregate gain&#x2F;loss per day, etc. That was the main reason i was using google finance.<p>I have now transitioned to my own Google Sheet with the &quot;=GOOGLEFINANCE()&quot; function for getting the stock data. Works pretty well.
评论 #16961596 未加载
koolbaabout 7 years ago
Very cool!<p>As everything is done client side how about adding some parsing of the URL #hash&#x2F;?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.
评论 #16971122 未加载
IloveHN84about 7 years ago
But if a website uses JavaScript, how can you say it is static? IMHO, static is only Html+css...
评论 #16961539 未加载
评论 #16963864 未加载
mikeoknerabout 7 years ago
Really cool! I love simple solutions like this.
ape4about 7 years ago
Looks like it gets an html page from <a href="https:&#x2F;&#x2F;iextrading.com&#x2F;apps&#x2F;stocks&#x2F;#&#x2F;&lt;stock&gt;" rel="nofollow">https:&#x2F;&#x2F;iextrading.com&#x2F;apps&#x2F;stocks&#x2F;#&#x2F;&lt;stock&gt;</a> then scrapes it. Not really an API. Edit: ok, I&#x27;m wrong.
评论 #16959109 未加载
评论 #16959093 未加载
评论 #16959174 未加载
craftyguyabout 7 years ago
I would like to find something like this that is usable by Libreoffice Calc.
评论 #16958958 未加载
评论 #16959147 未加载
djhworldabout 7 years ago
The demo site is cool, wonder if IEX will appreciate the thundering herd from HN though?