diff --git a/gnucash/price-quotes.scm b/gnucash/price-quotes.scm index c562987e9f..c73df2d02f 100644 --- a/gnucash/price-quotes.scm +++ b/gnucash/price-quotes.scm @@ -128,6 +128,9 @@ (catch #t (lambda () (gnc:debug "handling-request: " request) + (and (member (car request) '("currency" "alphavantage" "vanguard")) + (not (getenv "ALPHAVANTAGE_API_KEY")) + (throw 'need-alphavantage-key)) ;; we need to display the first element (the method, ;; so it won't be quoted) and then write the rest (with-output-to-port (fdes->outport (gnc-process-get-fd quoter 0)) @@ -447,6 +450,11 @@ (show-error (N_ "You are missing some needed Perl libraries. Run 'gnc-fq-update' as root to install them."))) + ((memq 'need-alphavantage-key fq-results) + (set! keep-going? #f) + (show-error (N_ "ERROR: ALPHAVANTAGE_API_KEY must be set for currency \ ++ quotes; see https://wiki.gnucash.org/wiki/Online_Quotes#Source_Alphavantage.2C_US"))) + ((memq 'system-error fq-results) (set! keep-going? #f) (show-error (N_ "There was a system error while retrieving the price quotes.")))