API: get transactions in reverse date order


(callum) #1

Hello!

I’m trying to list my three most recent transactions: https://getmondo.co.uk/docs/#list-transactions

It doesn’t seem to be possible to specify a sort order: the only way to do what I’m trying to do seems to be to specify a higher limit and guess the since property.

Am I missing something? Searching hasn’t found anything.

Callum


#2

It sort of looks like pagination might do what you want but not quite in the way you’d like. I can only guess that you’d move backwards from the most recent date until you have three unique transaction ids. That would be a lot of API hits and quite slow though.


#3

Any news on this? It’s a blocker for a project I’m working on and I don’t want to cache all transactions on my end (because both laziness and security) just to be able to reverse their order (and fetching all of them every single time is out of the question since the endpoint takes a good 10 seconds to respond for my account).


(Jedihomer Townend) #4

You could potentially use the since parameter to just retrieve transactions for, say, this month?


#5

This would make pagination inconsistent though; I could paginate by days instead but then I’d end up with an inconsistent number of items on each page.