I managed to fix the issue with 429 error I was getting because of the rate limit being exceeded. I just needed to set up an API key from CoinGecko. I also updated the code for the searching with .finIndex() instead of .find() and .indexOf() as suggested.