File: amex.py

package info (click to toggle)
python-ofxclient 2.0.4-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 256 kB
  • sloc: python: 1,322; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from ofxclient import Institution

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

accounts = inst.accounts()
for a in accounts:
    # a StringIO wrapped string of the raw OFX download
    download  = a.download(days=5)
    print download.read()

    # an ofxparse.Statement object
    statement = a.statement(days=5)
    print statement.balance