dvankley / firefly-plaid-connector-2

Connector to pull Plaid financial data into the Firefly finance tool
GNU General Public License v3.0
94 stars 14 forks source link

Allow batch mode to backfill more than 90 days of transaction history #111

Closed nprzy closed 1 month ago

nprzy commented 1 month ago

A few months ago, Plaid added the days_requested field to Get Transactions (docs). This field is only used the very first time you request transactions for an account and it specifies how much history Plaid will attempt to fetch from the institution. If left unspecified, it defaults to 90 days. After you've fetched your first batch of transactions for an account, daysRequested is then ignored for all subsequent calls.

This PR enables batch mode to fetch of more than 90 days of transaction history.

  1. This PR imposes a minimum of 180 days rather than the default 90 days. I did this because I think a common adoption pattern for this tool will be a user testing it first by loading transactions for a small duration, and then extending the syncDays duration after they decide they like the results. Since daysRequested only matters the very first time it's used, a minimum of 180 gives users a little more runway if they decide they want more.
  2. Otherwise, this will use the configurable syncDays parameter to request the desired amount of history, up to the maximum of 730 days.
dvankley commented 1 month ago

J'approve.