No.

As far as I know the Finance::Quote module that GnuCash uses has no provision to fetch historical prices.

If you are into scripting and web scraping, checkout Selenium which has a nice Python interface.

Good luck!

Geoff
=====
P.S.  Always include gnucash-user@gnucash.org on all correspondence.

On 30/12/2022 3:23 pm, gnucash_2...@michaelaltfield.net wrote:
2. Import from a CSV file:-
   (File / Import / Import prices from a CSV file)

OK, Is there a way that I can generate this CSV file using `gnc-fq-dump` or 
`gnucash-cli` or similar so that I can script something to fetch/generate a CSV 
file and then import that CSV file for all my stocks for a specific date?

On Fri, Dec 30, 2022 at 03:25:02PM +1100, Geoff wrote:
Hi Michael

You can't do this.

Alternatives:-
1. Key the prices directly into the Price Database:-
    (Tools / Price Data Database / Add)
2. Import from a CSV file:-
    (File / Import / Import prices from a CSV file)

Historical prices are available from, inter alia, https://finance.yahoo.com/


Regards

Geoff
=====

On 30/12/2022 3:06 pm, gnucash_2...@michaelaltfield.net wrote:
How can I tell GNU Cash to update its "Price Database" for all known 
currencies, stocks, bonds, mutual funds, etc for a *specific* day?

I'm trying trying to prepare a report for a date in the past. I've set the 
`Options` for the report to `nearest in time` so that it will grab the prices 
for the commodities from the Price Database that are closest to the date of the 
report as possible.

   * 
https://gnucash-docs-rst.readthedocs.io/en/latest/guide/C/ch_invest.html?highlight=price%20database#the-price-source-in-reports
Well, I checked the Price Database, and I have gaps in the prices for some of 
my stocks. For many stocks, I don't have any prices defined for the day of the 
report. Therefore, my report may be inaccurate.

I know that I can go to `Tools` -> `Price Database` and click the `Get Quotes` 
button. This will fetch the current quote (price) and add it to the Price Database 
for all defined currencies, stocks, bonds, mutual funds, etc. But that will fetch 
and add the prices for *today's date* only.

How can I do the equivalent of `Get Quotes` but for a specific day in the 
*past*?

(see also 
https://superuser.com/questions/1760157/how-to-get-quotes-for-all-currencies-and-stocks-for-a-specific-day-gnu-cash)
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to