[GNC] Importing stock prices from a CSV file
Kalpesh Patel
kalpesh.patel at usa.net
Sun Oct 1 19:48:33 EDT 2023
Just to remove any confusion, the CSV format of the importing stock prices as of GNC v4.18 is as follows (which I don’t believe has changed in later and 5.x version)...
"NAME_SPACE","TICKER_SYMBOL",date,"PRICE","QUOTE_CURRENCY"
One line per record each formatted as denoted above.
Double quotes around NAME_SPACE, TICKER_SYMBOL, PRICE and QUOTE_CURRENCY are required.
Date format I've utilized and has worked flawlessly has been mm/dd/YYYY.
NAME_SPACE corresponds to the top level name given in the 'Security' column in the 'Price Database' window and corresponds to 'From Namespace' heading in the 'Import Preview' window. I normally set this to what Yahoo Finance reports as the exchange where the security trades. This also is same thing as 'Namespace" in the 'Securities' window.
See code at https://github.com/ka-patel/dl_quotes/blob/main/yahoo_finance/get_historic_quotes.py for details if you are knowledged in Python.
https://github.com/ka-patel/dl_quotes/blob/main/yahoo_finance/README.md has additional details...
-----Original Message-----
From: flywire <flywire0 at gmail.com>
Sent: Saturday, September 30, 2023 6:46 PM
To: Ove Grunnér <write2ove at gmail.com>
Cc: Gnucash Users <gnucash-user at gnucash.org>
Subject: Re: [GNC] Importing stock prices from a CSV file
Yes Ove, clearly there is more to it as demonstrated by your example.
I can see the importer is using Commodity, Price Database uses Security, and Security Editor uses Namespace and Symbol.
https://www.gnucash.org/docs/v5/C/gnucash-guide/gnc-gloss.html doesn't help much.
More information about the gnucash-user
mailing list