Monitor IRA contributions
Track member IRA contributions over a period against annual limits.
Goal. Track how much a member has contributed to their IRA in a tax year, without counting money that moved the other way.
Endpoint. Get transaction list with type=ira.
Flow.
- Call Get transaction list with
type=ira, atransacted_at_start/transacted_at_endwindow covering the tax year, andlast_record_number=0. - Page through all results: repeat with the
last_record_numberfrom each response until you have pulledtotal_recordsitems. - Split the results by
transaction_name— this is the field that tells you which way the money moved:contribution— money into the IRA. These count toward the annual limit.distribution— money out of the IRA. These do not count toward the limit.
- Sum
amountacross contributions only (decimal math), and compare against the member's annual limit.
Edge cases.
type=iraalone is not enough. A contribution and a distribution both carrytype: "ira", andamountis unsigned — so filtering ontypeand summingamountsilently counts withdrawals as contributions. Always branch ontransaction_name.- In-flight movements. Check
statusbefore counting: onlycompletedtransactions have settled. Apendingorprocessingcontribution may still fail. - Decimal integrity. Sum
amountwith a decimal library throughout. Never introduce float arithmetic. - Tax-year boundaries.
transacted_atis UTC. A contribution made late on December 31 in a westward timezone lands in the following UTC year — apply your own timezone rules when bucketing by tax year.

