Dosu LogoDosu Logo
Ask
Join our Discord
SurePublic
we-promise
DocumentsSure
Transaction Sync Windows and Lookback
Transaction Sync Windows and Lookback
Type
Topic
Status
Published
Created
Jul 7, 2026
Updated
Jul 7, 2026

Transaction Sync Windows and Lookback#

Each bank provider (Plaid, Akahu, Enable Banking) uses a distinct strategy to determine the date window for fetching transactions. The Sync model supports dynamic window expansion when multiple syncs queue up while one is still pending.

Plaid#

Plaid uses a cursor-based incremental sync via transactions_sync , so there is no explicit start_date passed per sync call — Plaid's API tracks position via a cursor. The historical window is established at link time: MAX_HISTORY_DAYS is requested when creating a link token , which is 730 days in production, 90 days in development .

Investment transactions use a date-based window and fall back to the same MAX_HISTORY_DAYS constant when no start_date is provided .

Akahu#

The determine_sync_start_date method in AkahuItem::Importer implements a three-level priority:

  1. Account-level override — akahu_account.sync_start_date if set
  2. Item-level override — akahu_item.sync_start_date if set
  3. Auto-computed:
    • Incremental sync (has existing transactions + last_synced_at present): last_synced_at - 7 days
    • Initial sync (no stored transactions): 90.days.ago

Both akahu_items.sync_start_date and akahu_accounts.sync_start_date are stored as date columns in the database , allowing per-item and per-account user overrides.

Enable Banking#

The determine_sync_start_date method in EnableBankingItem::Importer uses a two-level strategy:

  • Incremental sync (has stored transactions):
    • If last_synced_at is known: last_synced_at - 7 days
    • Otherwise: 30.days.ago
  • Initial sync (no stored transactions): user-configured sync_start_date if set, otherwise 3.months.ago

The 7-day overlap on incremental syncs (shared by both Akahu and Enable Banking) guards against late-arriving or modified transactions that may not appear in real-time.

Sync Model: Dynamic Window Expansion#

The Sync model stores an optional window_start_date / window_end_date on each sync record. If a new sync is requested while an existing sync is still pending (not yet started), the expand_window_if_needed method widens the pending sync's window to cover both the old and new request:

  • Takes the earlier of the two start dates
  • Takes the later of the two end dates
  • If either side has a nil date (unbounded), the result is also nil / unbounded
  • Only applies when the sync is still pending — once a sync has started (syncing), its window is fixed

The window is validated to ensure window_start_date <= window_end_date .

Summary Table#

ProviderInitial lookbackIncremental overlapUser override
Plaid730d (prod) / 90d (dev) at link timeCursor-based (no date overlap)Not applicable
Akahu90 dayslast_synced_at − 7 daysPer-item or per-account sync_start_date
Enable Banking3 monthslast_synced_at − 7 days (fallback: 30 days)Per-item sync_start_date
Documents
Account Authorization and Permissions
Account Balance Calculation
Account Creation
Account Lifecycle Management
Account Reporting Controls
Account Statement Management
Account Statement Reconciliation
Account Type Architecture
AI Bank Statement Extraction
AI Chat Interface
API Authentication and Authorization
Authentication and Session Management
Balance History System
Banking Data Encryption
Broker Activity Import
Budget Management
Category Management
Cryptocurrency Account Management
CSV Import and Column Mapping
Currency Management
Dashboard Filtering and Drilldowns
Depository Yield Modeling
Dev Container Setup
Dividend and DRIP Modeling
Docker Self-Hosting
Enable Banking Consent Management
Enable Banking Error Handling
Enable Banking OAuth and PSD2 Authentication
Family Data Export
Family Settings Management
Financial Insights and Metrics
Financial Reporting
FIRE Planning and Retirement Calculations
Goals and Savings Tracking
Internationalization and Localization
Investment Account Data Pipeline
Investment Account Flow Semantics
Investment Account Reconciliation
Investment Activity Labels
Investment Holdings Management
Investment Tax Treatment Classification
Investment Trade Conversion
Investment Trade Entry
Invitation Lifecycle and State Management
Ledger Entry Accounting Model
LLM Provider Configuration
LLM Request Timeout and Watchdog System
LLM Tool Calling
Manual Account Entry and Import
Manual Valuation
MCP Tool Access
Multi-Currency Exchange Rates
NDJSON Import System
Net Worth Balance Sheet
OIDC Provider Configuration
Pending Transaction Reconciliation
Plaid Integration
Provider Import Adapter
Rails Development Environment Configuration
Rails PWA Integration
Recurring Transactions and Cash Flow Projection
REST API Architecture
Securities Lookup
Security Exchange Identification
Security Price Import Pipeline
SimpleFIN Holdings Import
SimpleFIN Integration
SimpleFIN Liability Balance Normalization
SnapTrade Integration
Split Transactions
SSO Audit Logging
SSO Authentication Flow
SSO Provider Management
Timezone-Aware Financial Data Handling
Transaction Categorization
Transaction Deduplication
Transaction Exclusion
Transaction Filtering and Search
Transaction Management
Transaction Rule Engine
Transaction Sync Windows and Lookback
Transfer Management
Transfer Matching and Pairing
Turbo Frame Navigation
Yahoo Finance Integration
How split transaction child exclusion was implemented
Is it possible to edit the date of a synced transaction (e.g., one synced by LunchFlow)?
Provider Architecture