Problems getting quotes for funds

David Reiser dbreiser at earthlink.net
Wed Mar 12 16:39:08 EDT 2008


Does two ugly hacks equal a fix?

When I sent out the first hack, I assumed that success of gnc-fq-dump  
= success for Get Quotes inside gnucash. Oops. It turns out that  
gnucash wasn't totally silent, just mumbling in the background about  
no currency being assigned. When I accommodated  yahoo_europe's new  
timespec field, I didn't bother matching the number of elements in   
@FIELDS and @FIELD_ENCODING lists. gnc-fq-dump didn't have a problem  
with that, but gnucash does. My second hack is just to add a second  
request for currency at the end of the encoding list. I have tested  
this inside gnucash, and it does work for European funds identified by  
isin.

REMEMBER: this hack definitely breaks Yahoo US (and most likely Yahoo  
Asia and Australia too). But if you can get all the rest of your  
quotes from either Yahoo_Europe or non-Yahoo sources, then it can  
retrieve quotes for isin identified funds. Instead of MFEXPG.L, you'll  
have to enter GB0003243465GBP as the 'ticker'.

This 'fix' is still ugly almost beyond belief, but it might be useful  
to some. There is a different patch in the Finance-Quote bug tracker,  
but it breaks non-European Yahoos as well.

Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yahoofix.diff
Type: application/octet-stream
Size: 1241 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-user/attachments/20080312/cbbff74e/attachment.obj 
-------------- next part --------------


On Mar 11, 2008, at 7:16 PM, David Reiser wrote:

> I'll see if I can find a straightforward fix. Since gnc-fq-dump says
> it can use one of 3 prices, maybe there is an easy way to branch the
> gnucash code on the gnucash side of the fq fetch. If it isn't
> relatively straightforward, it may be quite a while before someone
> else can look for a fix.
>
> Dave
> On Mar 10, 2008, at 4:39 PM, Paul Stansell wrote:
>
>>
>> Dear Derek,
>>
>> Recently, you helped me and others by providing a patch to deal with
>> fixing gnc-fq-dump so that it could get quotes from yahoo_europe  
>> after
>> they made changes to their stock and funds codes.
>>
>> Well, the patch does fix gnc-fq-dump so that I can get the price of
>> a fund
>> from the command line, eg "gnc-fq-dump yahoo_europe
>> GB0003243465GBP", but
>> I've just noticed that when I retrieve quotes for funds using
>> gnucash's
>> "Price Editor -> Get Quotes" the current quotes are not being stored
>> or
>> updated, and are not available to gnucash.  Stock prices, however,  
>> are
>> being updated and are available.  Also, unlike the case before the
>> patch
>> was suppled, there are no error messages after the "Price Editor ->
>> Get
>> Quotes" attempt to indicate that getting the prices of any of the
>> funds
>> has failed.
>>
>> Regards,
>>
>> Paul Stansell
>>
>>
>> On Tue, 12 Feb 2008, Derek Atkins wrote:
>>
>>> The command was renamed to gnc-fq-dump.   Using your example:
>>>
>>> gnc-fq-dump yahoo MFEXPG.L
>>> Finance::Quote fields Gnucash uses:
>>> symbol: MFEXPG.L             <=== required
>>>   date: ** missing **        <=== required
>>> currency: ** missing **        <=== required
>>>   last: 0.00                 <=\
>>>    nav:                      <=== one of these
>>>  price:                      <=/
>>> timezone:                      <=== optional
>>>
>>> ** This stock quote cannot be used by gnucash!!
>>>
>>>
>>> Maybe Yahoo changed their site and F::Q can't parse it?
>>>
>>> -derek
>>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
> --
> David Reiser
> dbreiser at earthlink.net
>
>
>
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

--
David Reiser
dbreiser at earthlink.net






More information about the gnucash-user mailing list