Hi,

We are working on the next release of Finance::Quote and will try to add 
https://iexcloud.io/ <https://iexcloud.io/> as a new module.

Like Alphavantage, users will need to register and get an API key.

Since GnuCash is a major user of Finance::Quote, I wanted to get opinions on 
how to handle API keys.  I have two initial ideas:


1. Each Finance::Quote module expects a module specific environment variable 
and GnuCash would need to update the Preferences > Online Quotes pane for each 
API key.

2. We invent a more global environment variable that can hold multiple API 
keys. For example, something like

FQ_API_KEYS=ALPHAVANTAGE_API_KEY:XXXXXXXXXXXXXXXX;IEXCLOUD_API_KEY:sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


The problem with the first approach is that GnuCash preferences need to change 
with each addition.

The problems wit the second approach are usability and parsing (do we assume no 
service would ever include : or ; in the API key?).  The later could be solved 
with json formatting, but that is even worse for users.



Appreciate any suggestions.


Best,

Vince
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to