SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

QuoteNotifier v0.17, 08/10/2001 (c) torh@bogus.net

This release is BOGUSWARE, which means you can use it as you like. If you have any insider stocktips, I'd like to hear about them. :-) If you modify the program, let me know about it!

This is a small perl utility written for the purpose of tracking whether or not a NYSE or NASDAQ share changes above or below a set threshold.

The program is designed to run as a cron(8) job, or in a while loop (for example, in a shell).

It can track single stock symbols from the command line, or single/multiple symbols from a configuration file.

How it works

Simple; it uses LWP to get the stock information from http://quote.fool.com, then does a simple arithmetic check to see whether or not it should notify you of any changes.

The program can send email or echo it to the TTY. It can also popup xmessages by adding the -x option.

Usage

./quotenotifier [-h|-v] [-x] [-m <address>] [-f <file>]

                [-ph <proxyhost> [-pp <proxyport>]]
                -s <symb> -t <val>[+]|-

i.e.

./quotenotifier -m torh@bogus.net -s SUNW -t 78

will notify me by email if Sun Microsystems (SUNW) climb above 78 dollars. The threshold value (t) cannot be given in fractions.

The following will give you a notification if a stock falls below a certain value:

./quotenotifier -s SUNW -t 68.50-

You can also try

./quotenotifier -s SUNW

which will give you a running update every time it is run, giving you the current (delayed by 20 or 15 minutes, depending on which market) share price.

To watch a portfolio, you can use a file, which should look something like this (call it "portfolio"):

        SUNW 78.2+ ; sun microsystems
        CIEN 45.0- ; if ciena drops below this, be start getting interested
        CIEN 80 ; above this? sell sell sell!!!
        ISLD 100+
        MSFT 200+  ; sell sell sell

You then execute quotenotifier the following way:

./quotenotfier -f portfolio -m torh@bogus.net

Requirements

This perl script requires the LWP::UserAgent, Mail::Sendmail and Getopt::Long modules. These can be installed using the CPAN module. Do the following if you don't have these modules:

perldoc CPAN

Read this documentation, then do:

        perl -MCPAN -e shell
        install LWP
        install Mail::Sendmail
        install Getopt::Long

If it doesn't work

Make sure you are connected to the Internet. Make sure your Perl binary is located in /usr/bin/perl. If not, change the first line of this program to where your Perl binary is located.

Be sure you enter the threshold value in DECIMAL or INTEGER notation. No fractional values will work properly.

If it still doesn't work, go ahead and email me!

Hello's to

Karim, who got me into online trading to begin with Datek.Com, who seem to be running a fine online brokering company Simon Walker, who clued me into needing proxies!


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.