GnuCash Finance::Quote: Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(10 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
Die Kursabfrage in GnuCash ist mit dem Perl-Modul Finance::Quote realisiert.
Quoting online services for stock quotes is implemented in GnuCash via Perl module Finance::Quote.


Details zu Finance::Quote siehe auch [[Finance Quote (Perl)|Finance::Quote]]
Homepage of Finance::Quote: https://finance-quote.sourceforge.net/


Weitere Infos zu Online Quotes im Gnucash-Wiki: 
For more details about Finance::Quote see my article: [[Finance Quote (Perl)|Finance::Quote]]
* https://wiki.gnucash.org/wiki/Online_Quotes
* https://wiki.gnucash.org/wiki/De/Aktienhandel


Gnucash-Wiki about Online Quotes: https://wiki.gnucash.org/wiki/Online_Quotes
== Installation und Update ==
== Installation und Update ==
Es gibt in GnuCash zwei Perl-Skripte, die die Arbeit mit Finance-Quote erleichtern:
 
  $ gnc-fq-check          # Überprüfung der Finance::Quote-Version sowie der installierten Module
=== Install Finance::Quote ===
  # gnc-fq-update         # Installation und Update der Finance::Quote-Module und aller Abhängigkeiten
 
Für Alphavantage muss vorher der eigene API-Key in der Environment-Datei von GnuCach gesetzt werden. Diese befindet sich in einem der folgenden Orte:
Install Perl for Windows → Start Menu → Folder GnuCash → "Extension for online download of Exchange Rates with GnuCash"
  /etc/gnucash/environment /usr/local/etc/gnucash/environment /opt/gnucash-2.x.x/etc/gnucash/environment  
 
Folgende Zeile muss dort eingesetzt werden:
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)#Finance::Quote installieren und upgraden|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>  
  ALPHAVANTAGE_API_KEY=<my-own-key>  
Alternativ kann der API-Key auch direkt in der Shell gesetzt werden:
Alternatively set the API-Key directly in the command line:
  export ALPHAVANTAGE_API_KEY=<my-own-key>  
  export ALPHAVANTAGE_API_KEY=<my-own-key>


== Fehlerdiagnose ==
== Check Finance::Quote ==
Kursabfragen für eine oder mehrere Aktien können zu Testzwecken mit folgendem Skript ausgeführt werden:
Go to GnuCash directory:
  gnc-fq-dump [-v] <quote-source> <stock1> [<stock2> ...]
  cd \Program Files (x86)\gnucash\bin\
Alternativ kann das Skript gnc_fq_helper verwendet werden, welches Fehler genauer ausgibt:
Check available sources:
  echo '(yahoo_europe "A0GFY7.SG")' | gnc-fq-helper
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
[[Kategorie:Linux]]  
[[Kategorie:Linux]]  
[[Kategorie:GnuCash]]
[[Kategorie:GnuCash]]

Aktuelle Version vom 28. April 2024, 20:31 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

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