Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

123
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda