Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
Best Way to repeatedly make API calls to a server with a constant time interval

I am working on a project which requires me to make api calls every minute and then process the data.

Currently I am using SetInterval Method in Javascript along with a fetch call .

But I am wondering if this is the best way to do this process. Or what are the drawbacks of using setInterval to make api calls repeatedly and show the processed data on the client.

SAMPLE CODE

const timeInterval = 10000;

setInterval(() => {
  fetch("https://api.solscan.io/nft/market/trade?offset=0&limit=10")
    .then((response) => response.json())
    .then((result) => processTradingData(result));
}, timeInterval);

Please Feel free to suggest better ways to do this, Current approaches drawback. I have plans to make this into a full-fldged product [So please let me know if the current Implementation is a good one or needs improvement].

Thank You.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!