.\" $HeadURL$ $LastChangedRevision$ .TH IOFDB-GET-PRICE 1 "ADE_APP_TOKEN_RELEASE_DATE_MAN" .SH NAME iofdb-get-price \- Get price of currency or stoc .br .ne 5 .SH SYNOPSIS .B iofdb-get-price [ .B \-V | .B \-\-version ] [ .B \-v | .B \-\-verbose | .B \-d .I level | .B \-\-debug=\fIlevel\fR ] [ .B \-h | .B \-\-help ] [ .B \-p | .B \-\-list\-paths ] [ .B LISTED_STOCK .I stock .I tgtcurrency | .B CURRENCY .I srccurrency .I tgtcurrency ] .br .ne 5 .SH DESCRIPTION .B Iofdb-get-price retrieves the current price of stock .I stock in currency .I tgtcurrency\fR, or of currency .I srccurrency in currency .I tgtcurrency\fR. The conversion is done using the .B perl\fR(1) library Finance::Quote::Yahoo (see .B Finance::Quote\fR(3pm)). Currencies are specified using ISO codes (e.g. US Dollars are .B USD\fR, Swedish Crowns are .B SEK\fR). Stocks are specified using country-code prefixed TMID codes (e. g. The Coca Cola Company is .B US:KO\fR, Halifax Bank Of Scotland is .B UK:HBOS\fR. .PP .I Iofdb-get-price is not very intelligent and requires that the target currency for listed stocks is the currency of the country specified by the stock's country-code prefix. E.g. it is not possible to get a quote for .B UK:HBOS in .B USD\fR). .br .ne 5 .SH CONFIGURATION None. .br .ne 5 .SH OPTIONS .TP 25 .B \-d \fIlevel\fR, \fB\-\-debug=\fIlevel\fR Determines how verbose .B iofdb-get-price will be. The message types displayed for the different values of .I level are as follows: .RS 25 .TP 5 .B 0 internal errors only .TP .B 1 internal errors and normal errors .TP .B 2 internal errors, normal errors and warnings .TP .B 3 internal errors, normal errors, warnings and informational messages .TP .B >3 all the above plus application-specific debug messages. .RE .TP .B \-h\fR, \fB\-\-help Displays a brief usage message. .TP .B \-p\fR, \fB\-\-list\-paths List the compiled-in paths of various files and directories that .B iofdb-get-price uses. .TP .B \-v\fR, \fB\-\-verbose Equivalent to .B \-d 3\fR. .TP .B \-V\fR, \fB\-\-version Print the program's version number and exit. .br .ne 5 .SH EXIT STATUS On success .B iofdb-get-price returns zero. On failure it returns non-zero and displays a diagnostic message. .br .ne 5 .SH FILES None. .br .ne 5 .SH ENVIRONMENT VARIABLES .TP 25 None. .br .ne 5 .SH EXAMPLES The following command gets the price of one share in of Yahoo Inc.: .IP .nf .fam C .B iofdb-get-price LISTED_STOCK US:YHOO USD 27.18 .fam T .fi .PP The following command gets the price of Slovak Crowns in Swedish Crowns: .IP .nf .fam C .B iofdb-get-price CURRENCY SKK SEK 0.2426 .fam T .fi .br .ne 5 .SH CAVEATS .B Iofdb-get-price currently supports only country-code prefixes .B US\fR, .B UK\fR and .B DE\fR. .PP .B Iofdb-get-price\fR's output is very terse; this is due to the author's desire that it should conform to one of the golden tenet's of Unix and thereby make it easier to integrate into .B iofdb and to reuse in other applications. .br .ne 5 .SH STANDARDS This manual page documents version ADE_APP_TOKEN_RELEASE_ID of .B iofdb-get-price\fR. .br .ne 5 .SH SEE ALSO iofdb(1), perl(1), Finance::Quote(3pm) .br .ne 5 .SH AUTHOR ADE_APP_TOKEN_AUTHOR_NAME .br .ne 5 .SH COPYRIGHT & DISTRIBUTION POLICY Copyright (C) 2003-ADE_APP_TOKEN_RELEASE_YEAR ADE_APP_TOKEN_AUTHOR_NAME .PP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.