InvestiFiPartner APIBeta
Prod Environment

Reconciliation using trading periods

Reconcile a settlement period's activity against your ledger using its authoritative totals.

Goal. Reconcile a settlement period's investment activity against your ledger.

Endpoints. Get trading period list for the period and its authoritative totals, then Get transaction list filtered by trading_period_id for the line items behind them.

Flow.

  1. Call Get trading period list with status=fully_settled and a start_time / end_time window covering your reconciliation run — only fully settled periods have final totals. Note the list defaults to the last 90 days when start_time is omitted; pass an earlier start_time to reach older periods.
  2. For each period, read total_transaction_volume and total_transaction_fees. These are the authoritative rollups; you don't need to compute them yourself. Get trading period detail adds total_gl_volume and a per-product breakdown if you reconcile per product line.
  3. Pull the line items: call Get transaction list with trading_period_id=<period id> and last_record_number=0, then page through all results.
  4. Match line items against your ledger on transaction_id, accumulating amount and fee (decimal math). Your accumulated totals should equal the period's rollups — if they don't, you have missing or duplicate ledger entries to investigate.

Edge cases.

  • Don't reconcile open periods. A period with status=open or pending can still change. Reconcile only fully_settled periods; re-run later for ones that were still settling.
  • Unassigned transactions. A transaction's trading_period_id is null until it's assigned to a period — recent activity may not appear under any period yet. It will be covered by a later period; don't force-match it.
  • Decimal integrity. Sum amount and fee with a decimal library throughout. Never introduce float arithmetic.
  • Category-level reconciliation. Each transaction carries a type (order, dividend, ira) — group by it if your ledger books those categories to different accounts.