View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Brandon Fosdick > Finance-OFX-2a > Finance::OFX::UserAgent



Annotate this POD


New  1
Open  0
View/Report Bugs
Module Version: 2   Source  


Finance::OFX::UserAgent - Open Financial Exchange client


 use Finance::OFX::UserAgent
 my $ua = OFX::UserAgent->new(Institution => $fi);
 my $response = $ua->account_info();


Finance::OFX::UserAgent provides an LWP::UserAgent like interface to an OFX server. It provides several convenience methods for performing common OFX requests. Results are returned as an Finance::OFX::Response object, which is an extension of HTTP::Response.


$ua = Finance::OFX::UserAgent->new( %options )

Constructs a new Finance::OFX::UserAgent object and returns it. Key/value pair arguments may be provided to set up the initial state. In addition to the regular LWP::UserAgent options, the following options are also recognized:

   Key                  Default
   -----------          --------------------
   Institution          undef
   language             ENG
   ofxVersion           100
   ofxAppID             QWIN
   ofxAppVer            0900
   userID               anonymous00000000000000000000000
   userPass             anonymous00000000000000000000000

All unrecognized keys are passed to LWP::UserAgent.


$ua->institution( $fi )

Get/Set the Finance::OFX::Institution object. Setter expects a reference.


Get a reference to the most recently returned Finance::OFX::Response object.

$ua->user_id( $user )

Get/Set the OFX user ID.

$ua->user_pass( $pass )

Get/Set the OFX user password.


All request methods return a Finance::OFX::Response object unless otherwise noted.

If a user ID and password have not been set the default/anonymous OFX ID and password will be used.


Request account dicovery from the configured Financial Institution.


Requests OFX profile information. Untested.

$ua->statement( $account, %options )

Request a statement download. Expects a Finance::OFX::Account object as the first argument to indicate the account to retrieve a statement for. %options can be:

   Key                  Description
   ------------         -------------------------------------------
   start                Start of date range to retrieve (UNIX time)
   end                  End of date range to retrieve (UNIX time)
   transactions         Request transaction list if set, otherwise 
                        get account balances

Not specifying a date range, or specifying an incomplete range, may or may not be a fatal error, depending on how the OFX server is configured. Some institutions appear to ignore the date range entirely and simply return whatever they feel like.


LWP::UserAgent Finance::OFX::Institution Finance::OFX::Response


From Finance::Bank::LloydsTSB:

This is code for online banking, and that means your money, and that means BE CAREFUL. You are encouraged, nay, expected, to audit the source of this module yourself to reassure yourself that I am not doing anything untoward with your banking data. This software is useful to me, but is provided under NO GUARANTEE, explicit or implied.


Brandon Fosdick, <>


Copyright 2008 Brandon Fosdick <>

This software is provided under the terms of the BSD License.

syntax highlighting: