Install & Setup

Get Online Statements into MS Money using Python Scripting

As discussed in the introduction, I headed down the path of modifying some Python scripts to suit my own needs shortly after reading about it on the TheFinanceBuff website.  The code has since been changed pretty extensively, and can be downloaded below (free), along with some quick instructions on how to install and use it.  I did not intend to "take up the torch" and blaze a path on this, but felt that this version of the code may be useful to others.  Since first posting, I've received many comments and suggestions, and some nice code enhancements too.  The package has reached a very stable state, so you should feel pretty comfortable that you aren't going to hurt anything by trying.  Comments and suggestions are welcome.

You will see that installation does require you to do a little work yourself, but don't be overwhelmed by what looks complicated.  It's actually very straight-forward and easy to install/configure.  It requires editing a file with a text editor (e.g., Notepad) to describe your financial institutions in a sites.dat file, and then entering your account access information using the Setup routine.  The instructions appear long, only because I've tried to complete.  If you go to the effort to get one site and account working correctly, you will see it's easy.  If you have questions, feel free to ask.

1. Install

a. Install Python

Enter the following at a CMD prompt.  This assumes Python is in your system PATH.  If not, you'll need to open the prompt in the Python installation folder.

C:> pip install requests


b. Install the PocketSense Package

Upgrading to a new version?  If you are currently using the PocketSense scripts, it's easy to upgrade to the latest version. Simply extract all of the files from the ZIP file to the install directory and overwrite the old files.  User-specific data (e.g., account and site settings) will NOT be altered when upgrading.  Additionally, take a look in the sites.template file when updating to a new version, to see what user options have been added.  These options will not automatically be added to your sites.dat file, since they really are optional.  You can add any switch/option from sites.template to your sites.dat file, if you want to over-ride the default value.

c. Install Microsoft Money

2. Setup 

Setup/Configuration Summary (See below for details of each step.)

2.1 Create Sites.dat

2.2 Edit Sites.dat

The sites.dat file is the only file that you need to manually edit.  There's no reason to edit the other files unless you intend to modify the code itself.  You can use any text editor, but I highly recommend Notepad++ (free), since it won't insert hidden codes, or try to save your file with the wrong extension.

Add your site information

2.3 Run Setup.py

The Setup.py utility is mostly self explanatory, but here are a few notes.

2.4  Prepare Money to Receive Your Statements

Stock/Fund Quote Support

Note:  The PocketSense quote feature relies on the Yahoo quote API, which provides support for a wide range of stock & mutual fund symbols. Be sure to include the fully qualified symbol prefix and symbol, the same as Yahoo Finance shows on their site.

Download Interval

There's a setting in sites.dat named defaultInterval, which defaults to a period of 7 days.  This interval is the period back in time (in days) that transactions will be collected.  To minimize the need to reconcile duplicate entries that may occur during the transition from the built-in downloads to the scripts, it's a good idea to keep a short interval and run the script every few days.  After you have been doing this for a couple of weeks, increase the interval to 14 days.  After you're well past the overlap with previous transactions, increase the interval to a longer period (30, 60 or 90 days).


Note: If you accidentally select the wrong account when first marrying an OFX statement to your Money file, read this article to fix it.

2.5  [OPTIONAL:]  Create an Account in Money to Receive Stock Quotes

3.  Download Statements and Quotes

Note: If you didn't test an account when configuring in Step 2.3.1, you will be prompted to match with an account during import.  It is highly recommended that accounts be tested when first configured using Setup.py, rather than trying to match them at this point, to avoid confusion.

Congratulations!  Once configured, Getdata.py is the only program you will run on a routine basis.

Note:  Stocks and funds that are in a Money account, for which you download statements, will update automatically when you import that account statement.  You do not need to update those separately.