ofx-summarize

When building importers, it helps to be able to peek into a .ofx or a .qfx file that you are trying to import. The ofx-summarize command does just that. It ships with beancount-reds-importers, and should be available by simply invoking the command. Running the command on a file shows you a few transactions in the file. What is very useful is to be able to explore your .ofx file via the python debugger or interpreter. Here is an example:

Here is a sample session:

Total number of accounts: 2
----------------
Account info:   01234567 Vanguard
Statement info: 2021-07-04 21:00:00 -- 2021-08-05 00:05:52. Bal: [(Decimal('123.45'), '6789'), ...]
Types:  {'buymf', 'sellmf', 'income', 'reinvest'}

2021-05-12 21:00:00 reinvest DIVIDEND REINVESTMENTDIVIDEND REINVESTMENT -678.90
2021-05-10 21:00:00 buymf MONEY FUND PURCHASE -12.10
2021-05-17 21:00:00 income DIVIDEND PAYMENTDIVIDEND PAYMENT 23.45
2021-05-18 21:00:00 sellmf MONEY FUND REDEMPTION 11223344.55
Hints:
- try dir(acc), dir(acc.statement.transactions)
- try the 'interact' command to start an interactive python interpreter
- type 'c' to explore the next account in this file
(Pdb)

From here, you can use the hints above to explore each transaction in the account.

Notes mentioning this note