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

194
Views
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 answers
Answer question

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 Report
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!