[GNC] Trouble with gnc-fq-dump
Daniel Torstenson
dtorstenson21 at gmail.com
Wed Dec 8 18:58:03 EST 2021
Hi, I'm trying to get online quotes to work with Alphavantage, but I'm
having trouble. I'd appreciate any pointers for debugging this, as I don't
see anyone else with this problem after searching the web a little bit.
I'm running Linux.
I have an Alphavantage API key.
A call to
https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=IBM&apikey=MY_API_KEY
gives the expected results
> gnc-fq-check
gives
("1.51" "aex" "alphavantage" "amfiindia" "asegr" "asx" "aufunds"
"australia" "bamosz" "bet" "bloomberg" "bourso" "bse" "bseindia" "canada"
"canadamutual" "comdirect" "cse" "deka" "dutch" "dwsfunds" "europe"
"fetch_live_currencies" "fidelity" "fidelity_direct" "finanzpartner"
"fondsweb" "fool" "ftfunds" "fundata" "fundlibrary" "goldmoney" "greece"
"hu" "hufund" "hungary" "hustock" "iexcloud" "india" "indiamutual"
"known_currencies" "morningstarau" "morningstarjp" "mstaruk" "nasdaq"
"nseindia" "nyse" "nzx" "onvista" "oslobors" "romania" "seb_funds" "six"
"tiaacref" "tmx" "tradeville" "troweprice" "troweprice_direct" "tsp"
"ukfunds" "unionfunds" "usa" "usfedbonds" "yahoo_json" "za")
> export ALPHAVANTAGE_API_KEY=MY_API_KEY
> echo $ALPHAVANTAGE_API_KEY
gives MY_API_KEY correctly.
> gnc-fq-dump -v alphavantage IBM
gives
Finance::Quote fields Gnucash uses:
symbol: IBM (deduced) <=== required
date: ** missing ** <=== recommended
currency: ** missing ** <=== required
last: **missing** <=\
nav: **missing** <=== one of these
price: **missing** <=/
timezone: <=== optional
** This stock quote cannot be used by GnuCash!
All fields returned by Finance::Quote for stock IBM
stock field value
----- ----- -----
IBM errormsg: Not Implemented
IBM last: **missing**
IBM nav: **missing**
IBM price: **missing**
IBM success: 0
I get the same for any ticker symbol I try.
Strangely, when I try
> gnc-fq-dump -v yahoo_json IBM ✔
I get
Finance::Quote fields Gnucash uses:
symbol: IBM <=== required
date: ** missing ** <=== recommended
currency: ** missing ** <=== required
last: **missing** <=\
nav: **missing** <=== one of these
price: **missing** <=/
timezone: <=== optional
** This stock quote cannot be used by GnuCash!
All fields returned by Finance::Quote for stock IBM
stock field value
----- ----- -----
IBM errormsg: Error retrieving quote for IBM. Attempt to fetch the
URL https://query1.finance.yahoo.com/v7/finance/quote?symbols=IBM resulted
in HTTP response 501 (Not Implemented)
IBM last: **missing**
IBM nav: **missing**
IBM price: **missing**
IBM success: 0
IBM symbol: IBM
It claims I'm getting error 501. But if I just copy and paste that URL into
a browser, I get the correct results. What could be going on here?
Thanks!
More information about the gnucash-user
mailing list