Skip to main content

Examples

Get all transactions

const transactions = [];
const institutionId = '603522490d2b02001233a5d6';

// Provide the date the financial institution account was created. If unsure,
// pass in a very old date.
const from = '2005-01-01';

// Start off with an empty ?last, to query the very first page of transactions
let last = '';

// Fetch `100` transactions per page
const limit = 100;

while (true) {
const page = await user.transactions.getList({ institutionId, from, last, limit });

if (!page.length) break;

transactions.push(...page);
// Use this page's last transaction id to query the next page and so on
last = page[page.length - 1].id;
}