Want to replicate the landing page of https://coinmarketcap.com/ as part of a college project. I want to build an API like https://docs.moralis.io/web3-data-api/how-to-get-the-top-erc20-tokens-by-market-cap, but avoid using 3rd party services and stick to web3.js, and ethers.js libraries.
One way would be to make a list of ERC20 tokens -> use web3.js to fetch each tokens dat (price and circulation) -> calculate market cap -> sort based on market cap and return as result.
However, I'm afraid this would be a very sluggish method.
Is there anything more efficient? (open to 3rd party libraries, crypto exchange apis as well if nothing works out)