Balance History
Balance history records store a time-series of account balance snapshots for a user’s connected Plaid accounts. A new snapshot is written every time the mining pipeline runs and receives updated account data from Plaid.
Balance history is used by underwriting and other downstream services to assess a user’s cash flow and eligibility for floats. Records have a TTL of 32 days by default, giving a rolling window of recent balance data.
See Plaid Mining Pipeline for when balance snapshots are captured (written by the refiner Lambda on every mining run).
Storage
Table: prod-txn-transactions
Region: us-east-2
Keys
| Key | Value |
|---|---|
|
|
|
|
The sort key uses ACCOUNT#<acct_id>#<date> which enables querying all balance history for a specific account in chronological order by using begins_with ACCOUNT#<acct_id>#.
|
Attributes
| Attribute | Description |
|---|---|
|
FloatMe user identifier |
|
Plaid account identifier |
|
Available balance in cents at the time of the snapshot |
|
Current balance in cents at the time of the snapshot |
|
Credit limit in cents (for credit accounts; |
|
ISO 4217 currency code (e.g., |
|
RFC 3339 date ( |
|
DynamoDB TTL Unix timestamp. Defaults to 32 days from |
Query Patterns
| Query | Index | Conditions |
|---|---|---|
Get balance history for a specific account |
Primary |
|
Get balance history for a specific account within a date range |
Primary |
|
Get all balance history for a user (all accounts) |
Primary |
|
TTL and Retention
Balance history records have a 32-day rolling retention window configured via the account_balance_ttl_days Terraform variable (default: 32). When a record’s TTL expires, DynamoDB automatically deletes it.
The TTL is set at write time based on the updated_date. Because a new snapshot is written on every mining run, active users will have many snapshots within the 32-day window. Inactive users (no mining in >32 days) will have no balance history.
Related Pages
-
Accounts & Balances — Current balance state per account
-
Plaid Mining Pipeline — How balance snapshots are captured during mining
-
Architecture —
prod-txn-transactionstable overview