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

195
Vistas
Unable to Fetch Coinmarketcap API data

This error:

Access to fetch at 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' from origin 'http://localhost:19006' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource

...is returned by this fetch request.

fetch(
      "https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest",
      {
        headers: {
          "Access-Control-Allow-Origin": "*",
          "Access-Control-Allow-Methods": "*",
          "Access-Control-Allow-Headers":
            "'Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token'",
          "Content-Type": "application/json",
          "X-CMC_PRO_API_KEY": API_KEY,
        },
      }
    )
      .then((response) => response.json())
      .then((json) => console.log(json))
      .catch((error) => console.error(error));

Why is this happening?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

1- send request to your backend processing file system (php,cfm,aspx) etc
2- use curl to process your api and send it via your backend code, do not use javascript to fetch "https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest" instead use "http://yourdomain.com/yourendpoint"
3- now at your end point use your backend tech to hit "https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest" via curl

about 4 years ago · Juan Pablo Isaza Denunciar
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