The dapp I'm building can not rely on the paging mechanism described here, since after a short amount of time I will have a lot of transactions for a given account. Retrieving them all to only select a few more recent ones is very time consuming.
If I understand your question correctly, I believe you're looking for something like this:
Where ACCOUNT_ID the account public key and N is the number of transactions you want to retrieve. Also note the order is descending (
See the page reference.
did you try using the .cursor(), something like:
server. transactions() .forAccount(accountId) .cursor(timestamp) ?