Problem with securities in CVS version

ace jones <[email protected]>
Newsgroups gmane.comp.finance.libofx.devel
Message-ID <[email protected]>
Hello.  I'm integrating libofx into KMyMoney financial software, and I
have run into a problem with the CVS version of libofx while working on
investments.  It seems to be unique to the CVS version, as the released
0.6.6 version works correctly in this case.  Any ideas would be greatly
appreciated.

Libofx does not seem to be reporting securities at all.  The security
call-back never gets called.  And in the transaction call-back, the
security_data_valid member is always false.

For example, here is the output from ofxdump in 0.6.6 for a sample OFX
file.  The file itself is copied in at the very end.

*** BEGIN

ofx_proc_status():
    Ofx entity this status is relevent to: SONRS 
    Severity: INFO
    Code: 0, name: Success
    Description: The server successfully processed the request.
    Server Message: Successful Sign On

ofx_proc_status():
    Ofx entity this status is relevent to: INVSTMTTRNRS 
    Severity: INFO
    Code: 0, name: Success
    Description: The server successfully processed the request.

ofx_proc_security():
    Unique ID of the security being traded: 987654321
    Format of the Unique ID: CUSIP
    Name of the security: Example security ABCDE
    Ticker symbol: ABCDE
    Price of each unit of the security: 10
    Extra transaction information (memo): Price as of date based on
closing price

ofx_proc_account():
    Account ID: broker.com 12345678901
    Account name: Investment account 12345678901 at broker broker.com
    Account type: INVESTMENT
    Currency: USD

ofx_proc_statement():
    Currency: USD
    Account ID: broker.com 12345678901

ofx_proc_transaction():
    Account ID : broker.com 12345678901
    Transaction type: OTHER: Other
    Date initiated: Fri Mar 26 13:00:00 2004 PST
    Date posted: Fri Mar 26 13:00:00 2004 PST
    Total money amount: -100.00
    # of units: 10.00
    Unit price: 10.00
    Financial institution's ID for this transaction: 1234.03262004.0
    Investment transaction type: REINVEST (Reinvestment of income)
    Unique ID of the security being traded: 987654321
    Format of the Unique ID: CUSIP
    Security data is available:
    START security_data content----------
ofx_proc_security():
    Unique ID of the security being traded: 987654321
    Format of the Unique ID: CUSIP
    Name of the security: Example security ABCDE
    Ticker symbol: ABCDE
    Price of each unit of the security: 10.00
    Extra transaction information (memo): Price as of date based on
closing price

    END security_data content----------
    Extra transaction information (memo): INCOME DIVIDEND

*** END

Now, here is the same OFX file dumped using the CVS version of ofxdump.

*** BEGIN

ofx_proc_status():
    Ofx entity this status is relevent to: SONRS 
    Severity: INFO
    Code: 0, name: Success
    Description: The server successfully processed the request.
    Server Message: Successful Sign On

ofx_proc_status():
    Ofx entity this status is relevent to: INVSTMTTRNRS 
    Severity: INFO
    Code: 0, name: Success
    Description: The server successfully processed the request.

ofx_proc_account():
    Account ID: broker.com 12345678901
    Account name: Investment account 12345678901 at broker broker.com
    Account type: INVESTMENT
    Currency: USD

ofx_proc_statement():
    Currency: USD
    Account ID: broker.com 12345678901

ofx_proc_transaction():
    Account ID : broker.com 12345678901
    Transaction type: OTHER: Other
    Date initiated: Fri Mar 26 13:00:00 2004 PST
    Date posted: Fri Mar 26 13:00:00 2004 PST
    Total money amount: -100.00
    # of units: 10.00
    Unit price: 10.00
    Financial institution's ID for this transaction: 1234.03262004.0
    Investment transaction type: REINVEST (Reinvestment of income)
    Unique ID of the security being traded: 987654321
    Format of the Unique ID: CUSIP
    Extra transaction information (memo): INCOME DIVIDEND

*** END

And here is the example OFX file that shows this behaviour:

*** BEGIN

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:FADF9EB7-D766-47E0-9208-EC79B4AE4884

<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0
<SEVERITY>INFO
<MESSAGE>Successful Sign On
</STATUS>
<DTSERVER>20040921192233[-5:EST]
<LANGUAGE>ENG
<DTPROFUP>20010918083000
<FI>
<ORG>Brokerage Firm
</FI>
</SONRS>
</SIGNONMSGSRSV1>
<INVSTMTMSGSRSV1>
<INVSTMTTRNRS>
<TRNUID>0A6CD428-622F-4908-896F-E0BCD917C1A2
<STATUS>
<CODE>0
<SEVERITY>INFO
</STATUS>
<CLTCOOKIE>4
<INVSTMTRS>
<DTASOF>20040921
<CURDEF>USD
<INVACCTFROM>
<BROKERID>broker.com
<ACCTID>12345678901
</INVACCTFROM>
<INVTRANLIST>
<DTSTART>20040101160000.000[-5:EST]
<DTEND>20040921160000.000[-5:EST]
<REINVEST>
<INVTRAN>
<FITID>1234.03262004.0
<DTTRADE>20040326160000.000[-5:EST]
<DTSETTLE>20040326160000.000[-5:EST]
<MEMO>INCOME DIVIDEND
</INVTRAN>
<SECID>
<UNIQUEID>987654321
<UNIQUEIDTYPE>CUSIP
</SECID>
<INCOMETYPE>DIV
<TOTAL>-100.00
<SUBACCTSEC>CASH
<UNITS>10.000
<UNITPRICE>10.00
</REINVEST>
<INVPOSLIST>
<POSMF>
<INVPOS>
<SECID>
<UNIQUEID>987654321
<UNIQUEIDTYPE>CUSIP
</SECID>
<HELDINACCT>OTHER
<POSTYPE>LONG
<UNITS>10000.000
<UNITPRICE>10.00
<MKTVAL>100000.00
<DTPRICEASOF>20040921160000.000[-5:EST]
<MEMO>Price as of date based on closing price
</INVPOS>
<REINVDIV>Y
<REINVCG>Y
</POSMF>
</INVPOSLIST>
</INVSTMTRS>
</INVSTMTTRNRS>
</INVSTMTMSGSRSV1>
<SECLISTMSGSRSV1>
<SECLIST>
<MFINFO>
<SECINFO>
<SECID>
<UNIQUEID>987654321
<UNIQUEIDTYPE>CUSIP
</SECID>
<SECNAME>Example security ABCDE
<TICKER>ABCDE
<FIID>1234
<UNITPRICE>10.00
<MEMO>Price as of date based on closing price
</SECINFO>
<MFTYPE>OPENEND
</MFINFO>
</SECLIST>
</SECLISTMSGSRSV1>
</OFX>

*** END

</Ace>




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.