pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Something better than www/urlget ?



On Wed, 13 Jul 2016, Thomas Klausner wrote:

On Wed, Jul 13, 2016 at 03:54:10PM +0800, Paul Goyette wrote:
i can get the quotes, but not the dividend info. quotes are still available
via csv file.

not sure how to call perl module from shell script.

I've written a simple perl script to get the price and dividends, see
attached.

The 'Dumper' line is to show what is available, the print lines show
how to get single values.

Obviously, you need to install finance/p5-Finance-Quote.

Well, I already had p5-Finance-Quote installed (as part of gnucash!).

The script works just fine, but there's one piece of information that I want but is not shown. The Dumper output returned

          'AAPLdiv' => '2.28',

which is correct for the "Forward Dividend", but I also want to track the "Trailing Dividend" (which, for AAPL, is $2.08).

BTW, the Forward Dividend value is also available via the "cvs" URL without using the perl code.

Thanks for trying!



+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index