chain_stats
Chain statistics from the Avalanche Stats API (pre-aggregated; closed periods only, so the current hour or day is not included). target=chain: tx count, gas used, fees paid and average gas price over the last hours (window=recent, max 720h = 30 days), or a time-series that also has active senders (window=series, days max 365; timeInterval=hour max 90 days). target=network: current P-chain validator snapshot. There are no per-contract stats here; for those, run SQL in the Builder Hub explorer Query page. Note: C-Chain gasUsed is gas-target-regulated, so daily gas is about stable even as tx count varies. That is expected, not an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Look-back days for window=series (default: 30, max 365; max 90 with timeInterval=hour) | |
| hours | No | Look-back hours for window=recent (default: 24, max 720) | |
| target | No | chain (default) | network | |
| window | No | chain: recent aggregate (default) or series | |
| chainId | No | EVM chain ID (default: C-Chain for the network) | |
| network | No | Network (default: mainnet) | |
| timeInterval | No | Bucket size for window=series (default: day) |