[GNC] Finance::Quote sort of works, almost

Geoff cleanoutmyshed at gmail.com
Wed Feb 3 19:13:31 EST 2021


Hi Andrea

Re (1).

Taking GnuCash out of the equation for a moment and using Finance::Quote 
directly, I get these results:

 >perl test_fq.pl morningstarch LU0341736642

     'LU0341736642 currency' => 'EUR',
     'LU0341736642 date' => '02/02/2021',
     'LU0341736642 errormsg' => 'Success',
     'LU0341736642 isodate' => '2021-02-02',
     'LU0341736642 last' => '986.36',
     'LU0341736642 method' => 'morningstarch',
     'LU0341736642 name' => 'NN (L) Health Care X Cap EUR',
     'LU0341736642 nav' => '986.36',
     'LU0341736642 net' => '12.3295',
     'LU0341736642 p_change' => '1.25',
     'LU0341736642 price' => '986.36',
     'LU0341736642 source' => 'http://www.morningstar.ch',
     'LU0341736642 success' => 1,
     'LU0341736642 symbol' => 'LU0341736642',
     'LU0341736642 time' => '12:00'


 >perl test_fq.pl mstaruk LU0341736642

     'LU0341736642 errormsg' => 'Error - failed to retrieve fund data',
     'LU0341736642 name' => '*** UNKNOWN ***',
     'LU0341736642 source' => 'http://www.morningstar.co.uk',
     'LU0341736642 success' => 0,
     'LU0341736642 symbol' => 'LU0341736642'


Visiting the Morningstar UK web site directly confirms that this is an 
unknown security - see attached screenshot.


Next, in GnuCash, I set up the security to retrieve prices as "Unknown" 
/ "morningstarch" and was able to retrieve a price successfully.  See 
attached screenshot.  I am running GnuCash 4.4 on Windows 10.

Hope this helps.

Regards

Geoff
=====

On 4/02/2021 10:06 am, Andrea Borgia wrote:
> Hi.
> 
> 
> Couple of weird issues getting F::Q to work on Debian "testing" with
> 
> libfinance-quote-perl                         1.49-1
> 
> gnucash                                       1:4.4-1
> 
> 
> 1) I have one fund whose quote is provided by Morningstar, LU0341736642:
> 
> gnc-fq-dump works for "morningstarch" but fails for "mstaruk":
> 
> gnc-fq-dump morningstarch LU0341736642
> Finance::Quote fields Gnucash uses:
>      symbol: LU0341736642         <=== required
>        date: 02/02/2021           <=== recommended
>    currency: EUR                  <=== required
>        last: 986.36               <=\
>         nav: 986.36               <=== one of these
>       price: 986.36               <=/
> 
>    timezone:                      <=== optionalHowever,
> 
> gnc-fq-dump mstaruk LU0341736642
> Finance::Quote fields Gnucash uses:
>      symbol: LU0341736642         <=== 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!
> 
> However,
> 
> * morningstarch is not available as source, as confirmed by the the docs 
> <https://www.gnucash.org/docs/v4/C/gnucash-help/fq-sources.html>.
> 
> * mstaruk, when run from gnucash, fails to return a quote.
> 
> 
> 
> 2) another couple of funds come from ftfunds, IE00BMWWJZ56:EUR and 
> LU0331286574:EUR
> 
> A direct query on the website works, the symbol above is copypasted, but 
> gnc-fq-dump complains:
> 
> gnc-fq-dump ftfunds IE00BMWWJZ56
> Finance::Quote fields Gnucash uses:
>      symbol: IE00BMWWJZ56         <=== 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!
> I'v tried tweaking the symbol adding "EUR:" before or ":EUR" after it 
> but no luck.
> 
> 
> 
> I have 3 more funds whose prices are correctly detected, by the way.
> 
> Any clues?
> 
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see 
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnc_morningstarch.jpg
Type: image/jpeg
Size: 106689 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20210204/33b933b6/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnc_mstaruk_error.jpg
Type: image/jpeg
Size: 58308 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20210204/33b933b6/attachment-0003.jpg>


More information about the gnucash-user mailing list