This is probably a question for a Kmymoney developer. I am in the process of hacking up a little python script to be called by Kmymoney to fetch stock quotes from Alphavantage, as is documented in Kmymoney handbook in the Online source quote section:
Note that the URL can also be a file: URL, which the quote fetcher takes to be the path to an executable script. It will pass any command-line arguments to it that you have specified, and feed the stdout to the page parser. For example, you might have a script called getquote.sh that contains custom quote logic, taking the symbol as a single parameter. Your URL would be “file:/path/to/getquote.sh %1”.
If my script has some sort of internal error, is there a way for it to emit an error message that would appear to the kmymoney user in the “Update price” dialog?
I have tried printing a message to stdout and stderr, but in either case, all I see in kmymoney is the usual “Failed to retrieve a quote…” modal error message and the “Unable to update price for … (no price or no date)” error in the Update prices dialog.