Uploading historical stock prices resp. creatung GUIDs for gnucash in an external program

Klaus Dahlke klaus.dahlke at gmx.de
Tue Feb 16 17:20:54 EST 2010


Hi all,
some background information to the above topic: since quite some time a manage and analysed  my investements in shares etc. via a postgresql database. At that time gnucash supported only xml-files. I run today gnucash 2.3.8 with a postgresql backend, but within gnucash I don't have all the historical share prices. To get rid of duplicating the share price I'd like to import the historical data into gnucash. 

First question: is there an API by which this can be accomplished?

The alternative I have thought about is to fill the prices table directly via e.g. a perl script. The script would read first the historical data and reformat them to the gnucash format. Obtaining currency_guid and  commodity_guid is pretty straight forward, but the guid itself needs to be created in that external script. Is that via gnucash-make-guids possible?

IIRC there is a module around that inserts Finance::Quote into the xml-file directly even gnucash is not running. Is that correct? If yes I could write a Finance::Quote modul that fetches the relevant from the historical database and parses them into the xml file (created by saving the postgresql backend as xml and after import, creating a new database ...).

Thanks for any help and advice.

Best regards,
Klaus


More information about the gnucash-user mailing list