ofxclient.Institution

class ofxclient.Institution(id, org, url, username, password, broker_id='', description=None, client_args={})[source]

Represents an institution or bank

Parameters:
  • id (string) – FI Id
  • org (string) – FI Org
  • url (string) – FI Url
  • username (string) – Customer username or member id
  • password (string) – Customer password or PIN
  • broker_id (string) – FI Broker ID (optional)
  • description (string or None) – Description of the bank (optional)
  • client_args (dict) – ofxclient.Client kwargs (optional)

Values for many of the parameters need to come from some sort of OFX registry which knows about each banks particular setup.

For help obtaining this sort of information; please see the ofxhome python module and/or the OFX Home website.

Example:

from ofxclient import Institution

inst = Institution(
          id       = '3101',
          org      = 'AMEX',
          url      = 'https://online.americanexpress.com/myca                            /ofxdl/desktop/desktop Download.do?                            request_type=nl_ofxdownload',
          username = 'gene',
          password = 'wilder'
)

for a in inst.accounts():
    print(a.statement(days=5).balance)
__init__(id, org, url, username, password, broker_id='', description=None, client_args={})[source]

Methods

__init__(id, org, url, username, password[, ...])
accounts() Ask the bank for the known ofxclient.Account list.
authenticate([username, password]) Test the authentication credentials
client() Build a ofxclient.Client for talking with the bank
deserialize(raw) Instantiate ofxclient.Institution from dictionary
local_id() Locally generated unique account identifier.
serialize() Serialize predictably for use in configuration storage.