Finance::Quote Keys and Options
John Ralls
jralls at ceridwen.us
Sun May 19 00:03:54 EDT 2024
> On May 18, 2024, at 16:33, Bruce Schuck <bschuck at asgard-systems.com> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> AlphaVantage is no longer the the only module that requires an API key for retrieving data. The following recently (or somewhat) added modules require API keys:
>
> TwelveData - TWELVEDATA_API_KEY
> Stockdata - STOCKDATA_API_KEY
> CurrencyFreaks - CURRENCYFREAKS_API_KEY
>
> Two existing currency rates modules also have API keys, Fixer and OpenExchange. I need to modify them to accept the keys as environment variables and not force them to have the key passed as arguments to the methods.
>
> WRT currency, the "FQ_CURRENCY" environment variable can be used to utilize a currency rates method other than the default AlphaVantage.
>
> As we have seen that requiring users to set environment variables has been problematic at times, what is the likelihood of being able to set these as GnuCash preferences much like setting the AlphaVantage key in preferences will set an environment variable?
>
> Upcoming modules with API keys are FinanceAPI (FINANCEAPI_API_KEY) and MarketStack (MARKETSTACK_API_KEY).
Bruce,
It wouldn’t be hard to add more keys to the GnuCash preferences page to collect API keys and set them as environment variables when querying F::Q, but is that the right way to do it? Can’t the key be passed in the query JSON? Same question for FQ_CURRENCY: Can that be passed in JSON instead of the environment?
Regards,
John Ralls
More information about the gnucash-devel
mailing list