This documentation describes two related components:
api_script.php
)Endpoint: https://theworm.me/api/validator_revenue.php
(Replace with your actual URL)
Method: GET
Description: This API retrieves data from the pub_earningads_api.php
and daily.php
APIs on arena.alkimist.xyz
, calculates daily, weekly, monthly, and quarterly revenue, and computes validator rewards based on a configurable number of validators.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
num_validators |
integer | No | 1 | The number of validators to use in the reward calculations. Must be a positive integer. |
format |
string | No | json |
The desired output format. Must be either json (for JSON output) or html (for an HTML table). |
{ "daily_revenue": 1234.56, "weekly_revenue": 5678.90, "monthly_revenue": 20000.00, "quarterly_revenue": 60000.00, "validator_daily": 123.46, "validator_monthly": 456.78, "validator_quarterly": 789.01 }
daily_revenue
: The Alkimist revenue for the day two days prior to the current date (due to API data delay), in USD.weekly_revenue
: The total Alkimist revenue for the current calendar week (Sunday to Saturday), in USD.monthly_revenue
: The total Alkimist revenue for the current calendar month, in USD.quarterly_revenue
: The total Alkimist revenue for the current calendar quarter, in USD.validator_daily
: The calculated daily reward per validator, in USD, rounded to two decimal places.validator_monthly
: The calculated monthly reward per validator, in USD, rounded to two decimal places.validator_quarterly
: The calculated quarterly reward per validator, in USD, rounded to two decimal places.A simple HTML table containing the same data as the JSON response, with column headers. Numeric values are formatted to two decimal places.
https://yourdomain.com/api_script.php?num_validators=5&format=json
https://yourdomain.com/api_script.php?num_validators=2&format=html
If an error occurs while fetching data from the external APIs or processing the data, the API will return a 500 status code and an error message.
calculator.php
)Endpoint: https://theworm.me/api/validator_rev_form.php
(Replace with your actual URL)
Method: GET
(initial page load), POST
(form submission)
Description: This provides a web form for users to interact with the Data API. Users can specify the number of validators and the desired output format (HTML or JSON).