Home
rticker
is a command-line based stock ticker application. It is capable of retrieving and displaying information about stocks (including ETFs), indexes, futures, currency pairs (forex), and option contracts. rticker
is also capable of showing profit/loss for open positions.
rticker
runs on any system with Ruby 1.8.7 or greater installed, including Ruby 1.9.
Example configuration files are in the gem in the data/
directory. The user can copy this directory to their home directory and rename it to .rticker.d
and then make a soft link from ~/.rticker.d/all.ticker
to ~/.rticker
. rticker
first loads its configuration from ~/.rticker
if no command line options are passed to it.
gem unpack rticker
cp -R rticker-1.1.0/data ~/.rticker.d
ln -sf ~/.rticker.d/all.ticker ~/.rticker
rm -rf rticker-1.1.0
Usage options:
% rticker --help
Usage: rticker [-onh] [-d SECS] [-p host:port] [-f FILE] ... [SYMBOL[,DESC[,COUNT@PRICE]]] ...
-o, --once Only display ticker results once then quit
-n, --no-color Do not use colors when displaying results
-f, --file FILE Specify a file that lists ticker entries, one per line
-d, --delay SECS How long to delay in SECS between each update
-p, --proxy HOST:PORT Host and port of HTTP proxy to use.
-h, --help Display this screen
This application is also capable of using an HTTP proxy. Simply pass --proxy HOST:POST
to the program.
The basic way of configuring rticker entries is as follows: SYMBOL,DESC,COUNT@PRICE
. SYMBOL
is a ticker symbol, such as AAPL
. DESC
is any descriptive text and is optional. For example, Apple Inc
. You can specify COUNT@PRICE
which is a position held by you. For example, if you own 100 shares of AAPL
purchased at 234.50, you can express this with 100@234.50
. If you provide information about an open position, rticker
will display your current profit/loss. Use a negative COUNT
to express a short position. So altogether, an example invocation might be:
% rticker 'AAPL,Apple Inc.,100@234.50'
You may of course put this information in a file such as ~/.rticker
with one ticker entry per line.
Please note that rticker
gets its information from both Google Finance and Yahoo Finance. Google is preferred as its data is closer to real-time and its platform is more stable. However, Yahoo provides access to far more information and is used where Google lacks. Yahoo is used for futures, currency pairs, and option contracts. For equities, Google is used by default unless the ticker SYMBOL is preceded by a carat (e.g., ^AAPL
) in which case Yahoo will be used.
To learn how to fetch currency pairs, option contracts, futures, etc., please look at the example configs.
I haven't had the time to write proper documentation. This is a very complete and useful application, but learning how to use it can be difficult without docs. If anyone messages me expressing interest, I will reply with useful information. Contacting me will also give me an incentive to write real documentation.