you need to deal with CORS policy.
the coinmarketcap API docs:
Making HTTP requests on the client side with Javascript is currently prohibited >through CORS configuration. This is to protect your API Key which should not be >visible to users of your application so your API Key is not stolen. Secure your API Key >by routing calls through your own backend service.
exposing your API key
any time a client visit the website or hit refresh there is a new call to the api endpoint.given the request limit(although you can subscribe to other plans), you could reach the limit in no time.by having a backend you can call the api on a specific time interval and cache the data then send the cache data back to the client.even on a free plan, that is 333 request per day, you can build a great info table
thank you @riskezwn .
you need to deal with CORS policy.
the coinmarketcap API docs:
exposing your API key
any time a client visit the website or hit refresh there is a new call to the api endpoint.given the request limit(although you can subscribe to other plans), you could reach the limit in no time.by having a backend you can call the api on a specific time interval and cache the data then send the cache data back to the client.even on a free plan, that is 333 request per day, you can build a great info table
Thank you very much for your reply!