romuloceccon / finance-quote-brazil

Gnucash/Finance::Quote modules to fetch prices of Brazilian stocks, bonds and mutual funds
MIT License
15 stars 2 forks source link

Finance::Quote Brazil

This is a set of Finance::Quote modules to fetch prices of Brazilian government and private bonds, Bovespa stocks, and mutual funds available at various banks.

Currently the following quoters are implemented:

Installation

There's no package installer. Just copy the pm modules to /usr/local/lib/site_perl/Finance/Quote and set the FQ_LOAD_QUOTELET environment variable so that Gnucash loads those modules. For example:

export FQ_LOAD_QUOTELET="Currencies Yahoo::Brasil TNBrasil SNDBrasil BMFBovespa"

Symbol names

Bond and mutual fund symbols are sometimes not available. In those cases a "fake symbol" – usually formed by replacing spaces with underscores – should be supplied to the quoter. For example:

(†) Nicknames and official names for Brazilian government bonds are as follows:

Debugging

If you have any issues trying to obtain quotes (from an interactive application like GnuCash) the script bin/getquote.pl may help with debugging. For example:

$ getquote.pl tesourodireto LFT_010321
LFT_010321: 7707.61 @ 2016-04-29 (last)

$ getquote.pl bmfdebentures TRIA-DEB22
TRIA-DEB22: 15131.170000 @ 2016-04-29 (last)

$ getquotes.pl vamfundos FIA_Dividendos
FIA_Dividendos: 0.701088117 @ 2016-04-28 (last)

To-do

License

Released under MIT License. See LICENSE for details.