3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV · data · SHyMEhvsPhTTiQCfQHbr9xt3McCRhAGPME8PtLz4bNY_9Ba7tjxSEN6U2dAmug28HNQHjNyET1gRZVfrcmgTfsHC_result_chatgpt
{
"SHyMEhvsPhTTiQCfQHbr9xt3McCRhAGPME8PtLz4bNY_9Ba7tjxSEN6U2dAmug28HNQHjNyET1gRZVfrcmgTfsHC_result_chatgpt": "To find out how many active wallets exist on the Waves blockchain in a certain day, you can use the Waves Node REST API. Follow the steps below:
1. First, you need to set up a connection to the Waves Node API. You can use cURL or any HTTP client library in your preferred programming language.
2. Make a GET request to the `/addresses` endpoint, specifying the number of transactions per page using the `limit` parameter and page number using the `page` parameter. The maximum allowed limit is 1000.
3. Iterate over the response data, which contains a list of addresses and their transaction counts. Filter out the addresses that have a non-zero transaction count, as these are considered active wallets.
4. Count the filtered addresses to get the total number of active wallets.
Here is an example using PHP:
```php
<?php
// Set the API endpoint
$apiEndpoint = 'https://nodes.wavesnodes.com';
// Specify the date in YYYY-MM-DD format
$targetDate = '2022-01-01';
// Set the limit of transactions per page
$limit = 1000;
// Initialize the page number
$page = 1;
// Initialize the total number of active wallets
$totalActiveWallets = 0;
do {
// Make a GET request to the /addresses endpoint
$requestUrl = "{$apiEndpoint}/addresses?page={$page}&limit={$limit}";
$response = file_get_contents($requestUrl);
$data = json_decode($response, true);
// Check if the response is successful
if ($data['status'] === 'success') {
// Iterate over the addresses
foreach ($data['addresses'] as $address) {
// Check if the address has non-zero transactions
if ($address['transactionCount'] > 0) {
$totalActiveWallets++;
}
}
}
$page++;
} while (count($data['addresses']) > 0);
echo "Total active wallets on {$targetDate}: {$totalActiveWallets}";
```
Replace `$targetDate` with the date you want to count the active wallets for. Keep in mind that this method may take a significant amount of time for a large number of wallets, as it retrieves addresses in pages. Adjust the `$limit` value according to your needs."
}
Changelog:
{
"2024.02.15 15:46": "To find out how many active wallets exist on the Waves blockchain in a certain day, you can use the Waves Node REST API. Follow the steps below:
1. First, you need to set up a connection to the Waves Node API. You can use cURL or any HTTP client library in your preferred programming language.
2. Make a GET request to the `/addresses` endpoint, specifying the number of transactions per page using the `limit` parameter and page number using the `page` parameter. The maximum allowed limit is 1000.
3. Iterate over the response data, which contains a list of addresses and their transaction counts. Filter out the addresses that have a non-zero transaction count, as these are considered active wallets.
4. Count the filtered addresses to get the total number of active wallets.
Here is an example using PHP:
```php
<?php
// Set the API endpoint
$apiEndpoint = 'https://nodes.wavesnodes.com';
// Specify the date in YYYY-MM-DD format
$targetDate = '2022-01-01';
// Set the limit of transactions per page
$limit = 1000;
// Initialize the page number
$page = 1;
// Initialize the total number of active wallets
$totalActiveWallets = 0;
do {
// Make a GET request to the /addresses endpoint
$requestUrl = "{$apiEndpoint}/addresses?page={$page}&limit={$limit}";
$response = file_get_contents($requestUrl);
$data = json_decode($response, true);
// Check if the response is successful
if ($data['status'] === 'success') {
// Iterate over the addresses
foreach ($data['addresses'] as $address) {
// Check if the address has non-zero transactions
if ($address['transactionCount'] > 0) {
$totalActiveWallets++;
}
}
}
$page++;
} while (count($data['addresses']) > 0);
echo "Total active wallets on {$targetDate}: {$totalActiveWallets}";
```
Replace `$targetDate` with the date you want to count the active wallets for. Keep in mind that this method may take a significant amount of time for a large number of wallets, as it retrieves addresses in pages. Adjust the `$limit` value according to your needs."
}