A
Anonymous
Guest
Hi everyone, I need to add the values of all addresses displayed in this api below. In the total of this example I have 2,484 addresses. The API only lets me display a maximum of 200 per page
How to display total values considering all addresses
Could you help me to run this sum even with a page limitation?
How to display total values considering all addresses
Code:
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trongrid.io/v1/contracts/TFczxzPhnThNSqr5by8tvxsdCFRRz6cPNq/tokens?only_confirmed=true&only_unconfirmed=true&order_by=balance,desc&limit=200",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Could you help me to run this sum even with a page limitation?