Bug 234268 - finance::quote tiaacred CREFbond online price quote problem
Summary: finance::quote tiaacred CREFbond online price quote problem
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 17:19 UTC by Toan
Modified: 2010-05-09 10:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toan 2010-04-13 17:19:37 UTC
Version:           3.97 latest svn (using KDE 4.4.2)
Compiler:          gcc 4.4.1 
OS:                Linux
Installed from:    Compiled From Sources


I try to setup online quote for CREFbond using finance::quote perl module. The module does return a quote for this fund. But KMM somehow could not extract the information.
Comment 1 Alvaro Soliverez 2010-05-09 01:32:44 UTC
The problem lies in that CREFBond returns a non-standard format.

Here is the a sample of ACN stock and from CREFBond

./financequote.pl nyse ACN
$VAR1 = 'ACNsymbol';
$VAR2 = 'ACN';
$VAR3 = 'ACNtime';
$VAR4 = '16:01';
$VAR5 = 'ACNdiv';
$VAR6 = '1.125';
$VAR7 = 'ACNdiv_yield';
$VAR8 = '2.74';
$VAR9 = 'ACNsuccess';
$VAR10 = 1;
$VAR11 = 'ACNlast';
$VAR12 = '40.32';
$VAR13 = 'ACNday_range';
$VAR14 = '40.17 - 41.09';
$VAR15 = 'ACNopen';
$VAR16 = '40.94';
$VAR17 = 'ACNavg_vol';
$VAR18 = '4105660';
$VAR19 = 'ACNhigh';
$VAR20 = '41.09';
$VAR21 = 'ACNname';
$VAR22 = 'Accenture plc. Cl';
$VAR23 = 'ACNdiv_date';
$VAR24 = 'May 14';
$VAR25 = 'ACNyear_range';
$VAR26 = '17.74 - 44.67';
$VAR27 = 'ACNask';
$VAR28 = undef;
$VAR29 = 'ACNpe';
$VAR30 = '17.58';
$VAR31 = 'ACNex_div';
$VAR32 = 'Apr 14';
$VAR33 = 'ACNnet';
$VAR34 = '-0.77';
$VAR35 = 'ACNbid';
$VAR36 = undef;
$VAR37 = 'ACNeps';
$VAR38 = '2.337';
$VAR39 = 'ACNprice';
$VAR40 = '40.32';
$VAR41 = 'ACNmethod';
$VAR42 = 'yahoo';
$VAR43 = 'ACNcap';
$VAR44 = '25.684B';
$VAR45 = 'ACNisodate';
$VAR46 = '2010-05-07';
$VAR47 = 'ACNlow';
$VAR48 = '40.17';
$VAR49 = 'ACNdate';
$VAR50 = '05/07/2010';
$VAR51 = 'ACNp_change';
$VAR52 = '-1.87';
$VAR53 = 'ACNcurrency';
$VAR54 = 'USD';
$VAR55 = 'ACNclose';
$VAR56 = '41.09';
$VAR57 = 'ACNvolume';
$VAR58 = '8319839';
"ACN","2010-005-007","./financequote.pl tiaacref CREFbond
$VAR1 = 'CREFbonddate';
$VAR2 = '05/07/2010';
$VAR3 = 'CREFbondexchange';
$VAR4 = 'TIAA-CREF';
$VAR5 = 'CREFbondsymbol';
$VAR6 = 'CREFbond';
$VAR7 = 'CREFbondnav';
$VAR8 = '94.1429';
$VAR9 = 'CREFbondcurrency';
$VAR10 = 'USD';
$VAR11 = 'CREFbondmethod';
$VAR12 = 'tiaacref';
$VAR13 = 'CREFbondsuccess';
$VAR14 = 1;
$VAR15 = 'CREFbondprice';
$VAR16 = '94.1429';
$VAR17 = 'CREFbondname';
$VAR18 = 'CREF Bond Market';
$VAR19 = 'CREFbondisodate';
$VAR20 = '2010-05-07';

The financequote.pl looks for a variable with "last" on it to get the price. tiaacref returns prices in a variable with "price" on it.

Someone with more Perl-fu than me can modify it to look for "price" if "last" is not there.
Comment 2 Alvaro Soliverez 2010-05-09 02:46:01 UTC
BTW, this error probably applies to all tiaacred items.
Comment 3 Cristian Oneț 2010-05-09 10:08:21 UTC
SVN commit 1124502 by conet:

BUG: 234268
Hacked this based on Alvaro's description. The price seems to be fetched now. If this can be written in a prettier way feel free to fix this since I'm not at home with perl.

 M  +5 -1      financequote.pl  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1124502