Indexer - search txn by sender and receiver

Hi everyone! Is there a way in Java to query the indexer and search transactions by sender AND receiver?
Thanks a lot!

Do you mean search all transactions where a given account X is the sender OR the receiver?
If yes, you can do it like that: Indexer - Algorand Developer Portal

However, if you want the sender to be X AND the receiver to be Y, this is not an operation allowed by the indexer REST API to my knowledge: indexer - Algorand Developer Portal

The simplest solution is probably to search for transaction where the sender is X, and then manually filter the ones where the receiver is Y.

yeah, this is what iā€™m gonna do but, i mean: maybe just one request without filtering the results would have been a better solution :slight_smile: however, thanks a lot @fabrice

it would be very nice if Indexer allowed simplified SQL queries using an API. Of course it would be possible to query the PostgeSQL database directly if you have your own indexer, but maintaining an indexer is quite expensive

1 Like