API referenceChain
Chain Events Stats
Last updated
Fetch the chain-activity aggregate — the pallet.method event distribution over the most recent N blocks — from the Postgres-backed all-events tier (ADR 0013). ?blocks sets the window (default 1000, capped 5000); activity is ordered by count descending (top 100). Backs the get_chain_activity MCP tool. Served live (no static file); empty (groups:0, activity:[]) before the all-events backfill runs.
Query Parameters
blocks?integer
Range
1 <= value <= 5000Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/chain-events/stats"{ "data": { "activity": [ { "count": 1, "method": "GET", "pallet": "example" } ], "groups": 1, "window_blocks": 5000000 }, "meta": { "artifact_path": "example", "cache": "short", "contract_version": "2026-06-29.1", "generated_at": "2026-06-01T00:00:00.000Z", "pagination": { "collection": "example", "cursor": 1, "limit": 1, "next_cursor": 1, "order": "asc", "returned": 1, "sort": "example", "total": 1 }, "published_at": "2026-06-01T00:00:00.000Z", "source": "live-cron-prober", "stale_contract": { "built_under": "example", "live": "example" } }, "ok": true, "schema_version": 1}