Get Energy Consumption Distribution
1. Overview & Typical Use
Returns the energy consumption distribution for contracts over a specified time period, including the ratio trends for staking, burning, and contract-supplied energy.
- Typical use: analyzing energy consumption source distribution trends across the network, tracking changes in staking vs. burning ratios.
- When not to use: to view per-contract energy consumption rankings, use “Get Contract Energy Consumption Data”.
2. Endpoint & Authentication
GET /api/energystatistic
For Base URL and authentication, see Common Network & Authentication.
3. Request
Fields
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
start_timestamp | integer | No | Earliest statistics start | Start timestamp in milliseconds |
end_timestamp | integer | No | Yesterday | End timestamp in milliseconds |
size | integer | No | 1000 | Number of results |
type | integer | No | 0 | Statistics type: 0 by day, 1 by month, 2 by quarter |
4. Response
Fields
Top-level
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
total | integer | Required | Number of data records | — |
max | object | Required | Data record with the maximum energy consumption | — |
min | object | Required | Data record with the minimum energy consumption | — |
data | array | Required | Energy consumption distribution list, see below | — |
avg_consume_energy | string | Optional | Average daily energy consumption | — |
yesterday_energy_ratio | string | Optional | Yesterday’s staking energy ratio | — |
data[] element
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
day | string | Required | Statistics date | yyyy-MM-dd |
total_energy | integer | Required | Total energy consumed on that day | — |
energy | integer | Required | Energy consumed from staking | — |
contract_supplied | integer | Required | Energy consumed from contract-supplied sources | — |
trx | integer | Required | Energy consumed by burning TRX | — |
energy_ration | string | Required | Staking energy ratio | — |
contract_supplied_ration | string | Required | Contract-supplied energy ratio | — |
trx_ration | string | Required | Burned TRX energy ratio | — |
5. Errors
For HTTP status codes, see Common Errors. Key points for this endpoint:
- Empty result is not an error: returns
200+data: []as a normal response.
Last updated on: