Hi,

I've been trying to get quotes via gnucash-cli with the following command:

gnucash-cli --quotes get mysql://<connection-details>

However, I get the following message when executing the command and no quotes 
are fetched: 'Price retrieval failed: GncQuotes::Fetch called with no 
commodities.'

All of my quote sources are of type 'Unknown' (tradegate, fondsweb).

When I get the quotes via 'Get Quotes' in the Price Database, the quotes are 
fetched normally, so it seems to be a problem with the CLI.

After some investigation, I found out 2 things:

1. When switching the quote source for a security to a source that is not 
Unknown, the CLI is able to fetch that security's quote.

2. When I edit the file libgnucash/engine/gnc-commodity.c and add the tradegate 
and fondsweb sources to the 'single_quote_sources' variable (thus making them 
known sources), the CLI is able to fetch all quotes, no more errors.

This leads me to believe that the CLI fetching ignores securities where the 
quote source is Unknown, whereas the GUI fetches the quotes regardless of the 
quote source. I was not able to pin down this behavior in the source, but maybe 
somebody can clarify whether this is the desired behavior for the CLI.

Tested with most recent stable branch and Flatpak version 5.3, F::Q versions 
1.54, 1.56 and 1.58, on Ubuntu 22.04.

_______________________________________________
gnucash-user mailing list
[email protected]
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