[GNC] Importing stock prices from a CSV file
Kalpesh Patel
kalpesh.patel at usa.net
Sun Oct 1 19:54:23 EDT 2023
Attached is a file of what it would look like with same security prices for different day and with multiple of these examples repeated for other securities and/or indexes ...
-----Original Message-----
From: Kalpesh Patel <kalpesh.patel at usa.net>
Sent: Sunday, October 01, 2023 7:49 PM
To: 'flywire' <flywire0 at gmail.com>; '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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnucash_quotes.csv
Type: application/vnd.ms-excel
Size: 8845 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20231001/f5227ab6/attachment.xlb>
More information about the gnucash-user
mailing list