Angular Stock Quoter Wiki
AngularJS application that retrieves stock quotes and builds table
Brought to you by:
aparham76
Welcome to your wiki!
This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
The wiki uses Markdown syntax.
This is a AngularJS Application that uses a public google API to retrieve stock quotes.
The file can be saved to a local file system (name this file with a .HTML extension) and viewed in
any browser. Just open the file with a browser from the location that it was saved to.
Seems to work best in Chrome and Firefox. User can edit the file to specify which stocks to track.
The screen will refresh with the latest quotes (real time) every so many seconds - the interval is
specified as a parameter in the file (paramater name: pollingInterval). The default is 5 seconds.
There are several objects inside of the file that must be configured to get the custom display
of stocks/options that the user wants to see on the screen. Below I list the objects that drive
this applicaton - under configuring the applicaton.
Features of this application:
1) Display of real time stock quotes at an interval that can be customized (default 5 seconds)
2) Display of options - very simple calculation of underlying stock price minus the strike price
of the option TIMES #shares to give the value of the option. Note that I do not provide a way
of intergrating any option premium price into the calculation
3) Dynamic totals are auto calculated as the table reloads with the latest information/prices
4) Ability to turn off (with checkboxes) major averages such as Nasdaq, DOW, or S&P so they do not
display in the table. Also ability to turn off CASH row in table and to hide all Stocks and all
options.
5) Ability to sort table rows by symbol name by clicking on the "Sybmol" label in the header
6) Ability to filter table by symbol name
7) Ability to see Extended quotes (pre-market or after-market) by selecting the "Extended Trading"
option in the dropdown
8) Ability to resize the table
Configuring the application
// need "shares" object for calculation of $Value
// Note! that the "shares" object must exist even if nothing is in it in witch case it would need to
// be set like this: var shares = {};
var shares = [{"symbol": "MU" , "shares": 1000, "cost": 35},
{"symbol": "AAPL" , "shares": 1000, "cost": 50},
{"symbol": "GOOG" , "shares": 100, "cost": 550},
{"symbol": "ORCL" , "shares": 1000, "cost": 35}];