public function all_coin()
{
$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://coinpaprika1.p.rapidapi.com/tickers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Host: coinpaprika1.p.rapidapi.com",
"X-RapidAPI-Key: api-key"
        ],
]);

$response = curl_exec($curl);
//$response = json_decode($response);
    $err = curl_error($curl);

curl_close($curl);

if ($err) {
return false;
} else {
return $response;
}
}
Bu koda bi bakın isterseniz hocam ben bu şekilde tüm coinleri alıyordum bir sistemde kullanmıştım işinize yarıyabilir.