Untitled

mail@pastecode.io avatar
unknown
php
2 years ago
503 B
3
Indexable
Never
<?php
start:
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.modulenft.xyz/api/v1/opensea/listings/new-listings?type=azuki&count=5&currencySymbol=ETH', [
  'headers' => [
    'Accept' => 'application/json',
  ],
]);

$saa = $response->getBody();
$js = json_decode($saa);
$price = $js->listings[0]->price;
$id = $js->listings[0]->tokenId;
echo "Token ID :".$id.PHP_EOL;
echo "Price :".$price.PHP_EOL;
goto start;
//print_r($js);