How do i get all transactions in an account without going through all the blocks?

Viewed 606
1 Answers

It's impossible to do through the API. It is possible to get with SQL query from public PostgreSQL database of the Indexer for Explorer

https://github.com/near/near-indexer-for-explorer#shared-public-access

However, the access is shared across everyone and has a very limited number of connections. So it's not the most reliable solution if you're building some project and need to do such queries regularly.

So if you need to get all transactions for the account regularly you will need to write and run your own indexer that stores data you need in some database so you can access it on regular basis.

Useful links:

Related