TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

207 点作者 lil_tee大约 7 年前

15 条评论

djhworld大约 7 年前
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 未加载
meredydd大约 7 年前
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.
dxxvi大约 7 年前
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 未加载
janvidar大约 7 年前
What makes this a &quot;static page&quot;? It&#x27;s all non-interactive javascript.
评论 #16959326 未加载
评论 #16959694 未加载
brandur大约 7 年前
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.
mmanfrin大约 7 年前
I had not realized Google killed Google Finance until this post -- the search replacement is abysmal.
indescions_2018大约 7 年前
Looks good! IEX API also has experimental support for websockets ;)
roadbeats大约 7 年前
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_psg大约 7 年前
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 未加载
koolba大约 7 年前
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 未加载
IloveHN84大约 7 年前
But if a website uses JavaScript, how can you say it is static? IMHO, static is only Html+css...
评论 #16961539 未加载
评论 #16963864 未加载
mikeokner大约 7 年前
Really cool! I love simple solutions like this.
ape4大约 7 年前
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 未加载
craftyguy大约 7 年前
I would like to find something like this that is usable by Libreoffice Calc.
评论 #16958958 未加载
评论 #16959147 未加载
djhworld大约 7 年前
The demo site is cool, wonder if IEX will appreciate the thundering herd from HN though?