GithubHelp home page GithubHelp logo

yazaddaruvala / stocks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toddwschneider/stocks

0.0 2.0 0.0 15 KB

A free, lightweight, blazing-fast static page to get stock quotes using the IEX API

License: MIT License

HTML 100.00%

stocks's Introduction

Stocks!

A free, lightweight, blazing-fast static page to get stock quotes using the IEX API. Stocks can be grouped into user-defined portfolios. Quotes update every 10 seconds. No API key required. Everything is contained within index.html, there are no external javascripts or stylesheets to load.

See here for a live demo: https://toddwschneider.com/stocks/

Motivation

I used to use Google Finance portfolios as a simple way to watch a few baskets of stocks organized along some dimension, typically by sector (banks, tech, etc). Then Google Finance killed the portfolios feature, and the new version had no option to view stock quotes organized under subheaders with good information density. I tried some alternatives, but many of them felt too bloated, so I built my own.

Screenshot

sample stocks

Customize

Add portfolio names and symbols as query parameters in the URL. For example, if you wanted to see the collection of bank and tech stocks from the above screenshot, you could use this URL:

https://toddwschneider.com/stocks/?Banks=GS,MS,JPM&Tech=AAPL,GOOGL,MSFT,AMZN

Alternatively, you can edit the DEFAULT_PORTFOLIOS variable within index.html. For example:

const DEFAULT_PORTFOLIOS = [
  {'name': 'Banks', 'symbols': ['GS', 'MS', 'JPM']},
  {'name': 'Tech', 'symbols': ['AAPL', 'GOOGL', 'MSFT', 'AMZN']}
];

Host your own

If you fork this repo on GitHub and edit index.html to reflect the stocks you want to watch, then you can use a GitHub Pages Project Page to publish your own version to the web.

You could also save index.html to your local disk and open it in your browser, or upload it to a cloud storage service like S3, GCS, or Azure Storage.

IEX API

You do not need to sign up for anything or get an API key to use the IEX API, but usage is subject to their terms of service.

Why aren't the market indices available? (S&P 500, DJIA, NASDAQ)

The IEX API only provides free data for stocks, not indices, so the closest thing is to use ETFs that track the major indices. See here for context: https://github.com/iexg/IEX-API/issues/36. Suggested index ETFs:

  • S&P 500: SPY
  • Dow Jones: DIA
  • NASDAQ: QQQ
  • Russell 2000: IWM

Browser compatibility

The page uses the Fetch API, which means it does not work with Internet Explorer.

stocks's People

Contributors

alexvinall avatar toddwschneider avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.