samedi 21 avril 2018

Trying to understand api limit requests (PHP)

I'm trying to get data on the top 10 cryptocurrency coins using coinmarketcaps api in php, but I'm having trouble understanding their wording on the api page, along with the understanding of api request limits.

According to coinmarketcaps api page (https://coinmarketcap.com/api/), there is the following limit:
-Please limit requests to no more than 10 per minute.

Lets say I use the file_get_contents() function to get the data and this is my script:

$data = file_get_contents('https://api.coinmarketcap.com/v1/ticker/?limit=100');
echo $data;

Is it considered 1 request every time the file_get_contents() function is called by the script?

Currently I'm running the script from my localhost using XAMPP, but if I were to upload the script to a hosting server and other people visit the site, and 11 people were on the website during a 1 minute period would that be over the limit assigned by coinmarketcap?

Help is greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire