<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rest.coinapi.io/v1/assets",
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-CoinAPI-Key: 6DAA21F0-BA7C-4D3E-80F6-806F5873D746"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>