GnuCash Finance::Quote: Unterschied zwischen den Versionen

Aus MattWiki
Translated to english
Keine Bearbeitungszusammenfassung
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 1: Zeile 1:
Quoting online services for stock quotes is implemented in GnuCash via Perl module Finance::Quote.
Quoting online services for stock quotes is implemented in GnuCash via Perl module Finance::Quote.
Homepage of Finance::Quote: https://finance-quote.sourceforge.net/


For more details about Finance::Quote see my article: [[Finance Quote (Perl)|Finance::Quote]]
For more details about Finance::Quote see my article: [[Finance Quote (Perl)|Finance::Quote]]
Zeile 15: Zeile 17:


=== Find Finance::Quote Version ===
=== Find Finance::Quote Version ===
Check which Finance::Quote is the most recent one online: https://finance-quote.sourceforge.net/
Check installed Finance::Quote Version:


Open GnuCash → Menu Help → About Gnucash → Look at Finance::Quote Version
Open GnuCash → Menu Help → About Gnucash → Look at Finance::Quote Version
Zeile 38: Zeile 44:
  export ALPHAVANTAGE_API_KEY=<my-own-key>
  export ALPHAVANTAGE_API_KEY=<my-own-key>


== Check Finance::Quote ==
== Check Finance::Quote via GnuCash CLI ==
Starting with GnuCash 5.0 there is a command-line interface which allows for fetching quotes for testing purposes.
 
Go to GnuCash directory:
Go to GnuCash directory:
  cd \Program Files (x86)\gnucash\bin\
  cd \Program Files (x86)\gnucash\bin\

Aktuelle Version vom 23. April 2025, 13:48 Uhr

Quoting online services for stock quotes is implemented in GnuCash via Perl module Finance::Quote.

Homepage of Finance::Quote: https://finance-quote.sourceforge.net/

For more details about Finance::Quote see my article: Finance::Quote

Gnucash-Wiki about Online Quotes: https://wiki.gnucash.org/wiki/Online_Quotes

Installation und Update

Install Finance::Quote

Install Perl for Windows → Start Menu → Folder GnuCash → "Extension for online download of Exchange Rates with GnuCash"

C:\Program Files (x86)\gnucash\bin\install-fq-mods.cmd

Further informaions: https://wiki.gnucash.org/wiki/Online_Quotes#Requirements

Find Finance::Quote Version

Check which Finance::Quote is the most recent one online: https://finance-quote.sourceforge.net/

Check installed Finance::Quote Version:

Open GnuCash → Menu Help → About Gnucash → Look at Finance::Quote Version

Alternative:

C:\Program Files (x86)\gnucash\bin\gnucash-cli.exe --quotes info

Update Finance::Quote

cd \Program Files (x86)\gnucash\bin\
perl gnc-fq-update

Further information: Finance Quote (Perl) Abschnitt: Finance::Quote installieren und upgraden

Set up Alphavantage

For Alphavantage first a API key is necessary which needs to be put into the environment file of GnuCash. It can be fount in one of these locations:

/etc/gnucash/environment 
/usr/local/etc/gnucash/environment 
/opt/gnucash-2.x.x/etc/gnucash/environment 

Add the following line there:

ALPHAVANTAGE_API_KEY=<my-own-key> 

Alternatively set the API-Key directly in the command line:

export ALPHAVANTAGE_API_KEY=<my-own-key>

Check Finance::Quote via GnuCash CLI

Starting with GnuCash 5.0 there is a command-line interface which allows for fetching quotes for testing purposes.

Go to GnuCash directory:

cd \Program Files (x86)\gnucash\bin\

Check available sources:

gnucash-cli --quotes info

Dump quotes from a specific source, i.e.:

gnucash-cli --quotes dump yahoo_json MSF.DE
gnucash-cli --quotes dump alphavantage MSF.DE