Hi guys,
I am currently calculating the portfolio of an address this way:
First I get all the tokens with balance from a particular wallet.
Once I have the list of token addresses, I get all the trades in the last 6 month for those tokens. This queries take usually more than 15 seconds for just one wallet and array of tokens. I need some help to improve the performance of that.
Finally I get init token balance, current price and price in the last 24 hours.
What can I do to improve or even aggregate these queries in one or two, in order to get a better performance?
Thank you,