Relative Content

Tag Archive for reactjsapistockalpha-vantage

Limiting API calls with Alpha vantage on React

I am trying to limit the number of API calls being made when fetching data from Alpha Vantage. So far I’ve tried using throttling and debouncing, I also tried using the setInterval() method inside a useEffect, which were to no use as when running the react app it makes a lot of API calls. How can I change these simple lines so that it only makes one API call per a set amount of time: