Code Monkey home page Code Monkey logo

quoter's Introduction

Quoter - The Console Based Stock Quote Tool

Quoter is a small command line tool to fetch stock quotes and US index data. It's a single executable JAR file. No installation needed, just download the file and run it from the command line with java -jar quoter.jar

Quoter simply pulls the stock and index data from a financial website. Because the data iss scraped from a website, if the provider changes the site structure, the is a high likelihood that Quoter will break. It's not a hard fix usually, but does mean I'll need to update it. This is why it's always a good idea to be running the latest version.

I live in the US and quoter is configured to pull indexes from the three common US exchanges: DOW, S&P500, and the NASDAQ. However, stock values should be able to be pulled from other countries assuming it's supported.

Program Options

Configuration

Option Description
-z Disable colorized output
-w COLUMNS Set a custom width for the trending display. This is the number of columns the output should use. I have Quoter aliased and I call it with my current column width minus a few characters
-n Hide the index display and just show the stock quotes. If no stocks are provided, then nothing will happen
-a SEC Auto refresh the screen every SEC seconds until application is cancelled by hitting Enter or Ctrl-C. The screen will be cleared at each refresh
-d DAYS Trend duration. Set the number of days to include in the historical trend display -t. The default is 90 days so you'll get approximately three months of trend data. This setting is saved in the preferences system and is "sticky". If it's set to 30 days, for example, the next time trend is run it will show 30 days. It can be changed by re-running Quoter with the -d DAYS switch. The maximum trending duration is 99 days.

Saved Favorites

Option Description
-s Save the securities provided into the preferences system as a favorite that will be executed each time Quoter is run. If the -t Trend display is requested, the saved securities will be included. If an symbol is added on the command line it will be shown along with those that are saved. If -s is provided and there are already saved securities, the current list will overwrite the existing list
-l List the current saved favorites
-r Remove the saved favorites and exit. If you'd like them back you'll simply need to re-save them with the -s flag
-i Ignore saved favorites for this execution. They will remain saved

Security Information

Option Description
-t After the initial quote information, display a six month historical view of daily high, low, and close values. Please see the discussion on trending below
-x FileName Export the results into the specified file in CSV format. Note it needs to be a location can can be written to by the user

Miscellaneous

Option Description
-D Start in Debug Mode which will display additional debugging data. Normally not used
-v Display the current program version as well as check for an updated release on GitHub. If you installed via the Quoter SNAP, updates will occur automatically and you won't need to do anything. In fact, snaps are usually at a newer version than the GitHub releases. If you installed via GitHub, just download the latest .JAR file and replace the old one. No installation necessary.
-h or -? Display the help page

Parameters

No parameters are required. If none are entered, the program will provide the DOW, NASDAQ, and S&P500 index data.

However, you probably want some quotes. Therefore, provide one or more.

Example:

java -jar quoter.jar amzn msft acn ibm
java -jar quoter.jar -x outputfile.csv t bp cmcsa ni vz 

Saved Securities

If you frequently check the same set of securities, as I do, you can save them in your preferences file as facorites so you don't need to type them in each time or setup an alias. By simply adding -s to your quoter command line, the provided securities will be saved overwriting any that were previously saved. Then by running Quoter, those will be be used in addition to any you've added to the command line.

Running Quoter with -r will remove any saved quotes. Running with -i will ignore the saved quotes for that execution. Running with a -l will list your current saved favorites.

Trending

This powerful feature will display the requested (with -d) days to trend. The default is 90 days. The dates are on the Y axis, an the cost is on the X axis, you just tilt your head to the right (like you were eating a taco) and you'll be set :-)

It's executed by giving Quoter the -t command line switch. If there are 5 symbols on the command line, it will trend them all in sequence.

The display will show you the last three months of data with the daily range and the close price.

SNAP Installation

quoter

I would encourage anyone with a supported Linux platform to install Quoter as a snap. See Snapcraft Homepage for more information. You can download, install, and keep the application up to date automatically by installing the snap via :

sudo snap install quoter (Assuming snap is installed. Ubuntu has it by default)

This will install the application into a sandbox where it is separate from other applications. Java is even included in the SNAP package so you don't evey have to have it elsewhere.

SNAPs are easy to install and remove. They are automatically updated and run with everything it needs in the package. For example, Quoter is a Java application, but you don't have to even have Java installed on your system as it's packaged within the SNAP.

If you are going to use the export capability, you'll need to give the snap access to your home directory. This is done after the snap installation by connecting quoter to the home interface. Simply run the following:

sudo snap connect quoter:home

Get it from the Snap Store

Feedback

This is obviously not meant to be a large financial package. It's just a small utility that I wanted to use to tell me if I'll ever be able to retire :-) If you have suggestions or idea, please let me know.

quoter at fross dot org

License

The MIT License

Copyright 2019-2024 by Michael Fross

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

quoter's People

Contributors

frossm avatar pgalasti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

quoter's Issues

OPEN / CLOSED Status Issue

Hello Quoters,

As of 2/22/2024 there is an issue with the open/closed state. This is larger than a simply display issue as there are different xPaths to the data depending if the market is open or closed. So while this label is incorrect, the index data may not be valid.

Another oddity is that it seems to start working after the market has been open for an hour or so. Strange.

I'll work on getting this fixed, but it will probably be early next week since I need it to be broken in order to troubleshoot the issue. I'll update this issue here as progress is made.

For SNAP installation, the update should automagically be installed. For those running directly from the JAR file, you'll need to download a new one.

Kind regards,

Michael

PS: I would suggest trying to stay up to date on query.jar given that a change on the financial institution's website could break quoter until I update it. I'm scraping the data from the webpages.

IMPORTANT: IEX Discontinuing Their Free Service

I received the following message from IEX concerning my free account. If you are using Quoter you probably have received the same thing. On June 15th, Quoter will stop working for quotes (although the index will continue to function.) I'll need to find a replacement.

This is very disappointing....


Important Updates to Your IEX Cloud Plan

Thank you for being a loyal IEX Cloud customer. Your trust and satisfaction mean a lot to us, and we hope you’ve been successful in using our data.

I am writing to let you know that we will be retiring plans that provide free access to financial data, effective June 15, 2023.

As a one-time offer to our customers on Start plans, you may upgrade from your Start plan to a monthly subscription at a price of $19/month. With this new plan, you will continue to have access to the same financial data you have today. Go to your console to upgrade.

If you do not take any action to upgrade your account, you will lose access to IEX financial data on June 15, 2023.

If you have questions about this change, please contact IEX Cloud Support.

Regards,
Liz Grausam
Head of IEX Cloud

Support flag to disable Index quotes

It would be great to have a flag that disables the fetching and display of the index quotes.

The requests to CNBC tend to timeout sporadically.

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.