Use Mop in Linux Command Line to monitor stock prices
It is usually good to have a hidden income, especially when you can easily coordinate your part-time and full-time work. If you use a networked computer in your daily work, stock trading is a popular option to get extra income.
However, currently, only a few stock monitoring software can run on linux, most of which are based on graphical interfaces. What if you are a Linux expert who spends a lot of time working on a computer without a graphic interface? You can't do it anymore? No, there are some stock tracking tools under the command line, including Mop, which is the tool to be discussed in this article.
Mop
Mop, as described above, is a tool for continuously displaying and updating information about US stocks and independent stocks under the command line. Using the GO language is the wisdom of Michael Dvorkin.
Download and install
Because this project is implemented using GO, the first step you need to do is to install this programming language on your computer. below is the Debian system, for example, to install GO on Ubuntu:
sudoapt-get install golang
mkdir~/workspace
echo'export GOPATH="$HOME/workspace"'>>~/.bashrc
source ~/.bashrc
After GO is installed, the next step is to install the Mop tool and configure the environment. You need to run the following command:
sudoapt-get install git
go get github.com/michaeldv/mop
cd $GOPATH/src/github.com/michaeldv/mop
make install
export PATH="$PATH:$GOPATH/bin"
After that, run the following command to execute Mop:
cmd
Features
When you run Mop for the first time, you will see output information similar to the following:
As you can see, the output information-periodic automatic refresh-contains information about several major exchanges and individual stocks.
Add or delete a stock
Mop allows you to easily add/delete individual stock information from the output list. All you need to do is to press "+" and enter the stock name. For example, add Facebook (FB) to the list.
When I press the "+" key, a column containing the text "Add tickers:" appears, prompting me to Add the stock name -- I added FB and press Enter. The output list is updated, and the newly added stocks are also displayed in the list:
Similarly, you can use the "-" key and provide the stock name to delete a stock.
Group by price
Another way to group stocks is to press the "g" key based on the rise or fall of their stock price. Next, the stocks will be grouped and displayed in a green font, while the falling stocks will be displayed in a black font.
As follows:
Column sorting
Mop also allows you to change the sorting rules based on different column types. In this usage, You need to press "o" (This command uses the values in the first column by default), and then use the left and right keys to select the columns to be sorted. After that, press enter to reorder the content.
For example, the following is the result sorted by the first column of the output content and the alphabet.
Note: For better understanding, compare it with the screenshot above.
Other options
Other available options include "p": Pause market and stock information updates, "q" or "esc" to exit the command line program, "?" The Help page is displayed.
Conclusion
Mop is a basic stock monitoring tool that does not provide many features, but only provides the features it claims. Obviously, this tool is not provided for professional stock traders, but is just a choice for tracking stock information on machines that only have command lines.
Via: https://www.maketecheasier.com/monitor-stock-prices-ubuntu-command-line/
Author: Himanshu Arora Translator: oska874 Proofreader: wxy
This article was originally compiled by LCTT and launched with the honor of Linux in China
This article permanently updates the link address: