chain_stats
On-chain statistics via the query gateway, which picks the most accurate live source PER FIELD and stamps it (sources/warnings in the response). target=chain: tx count/gas/fees/active senders/avg gas price over a recent window (window=recent, hours, max 720h = 30 days) OR a time-series (window=series, days, max 365). target=contract: per-contract tx/sender/gas totals (days, max 365 — use this for contract activity beyond 30 days). target=network: current P-chain validator snapshot. IMPORTANT: relay any warnings notes to the user verbatim-in-substance (e.g. gas coverage windows or accuracy caveats) — never present a flagged value as exact. Note: C-Chain gasUsed is gas-target-regulated, so daily gas is ~stable even as tx count varies — expected, not an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Look-back days for series / contract (default: 30, max 365) | |
| hours | No | Look-back hours for window=recent (default: 24, max 720) | |
| value | No | Contract address (target=contract) | |
| target | No | chain (default) | contract | 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) |