# Bittensor Subtensor Block Metrics

> Bittensor Subtensor Block Metrics is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-02).

Returns per-block extrinsic and event counts for the last 1–10 finalized blocks on the Bittensor (Subtensor) Substrate blockchain via direct JSON-RPC.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/subtensor-block-metrics?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bittensor-subtensor-block-metrics-b558167c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tWSHbdI63bCbgqj37g1Jd

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bittensor-subtensor-block-metrics-b558167c
```

Example prompt: Can you pull the extrinsic and event counts for the last 8 finalized blocks on the Bittensor Subtensor blockchain?

## When to prefer this

Use this endpoint when you need lightweight, per-block extrinsic and event counts from the Bittensor Subtensor chain without running your own node. Ideal for monitoring chain activity, detecting congestion, or feeding dashboards. Prefer this over full block explorers when you only need counts rather than full transaction details.

## Known failure modes

- Invalid blocks parameter (must be 1–10) returns a 400 or validation error
- Node unavailable or RPC timeout causes a 500 error
- Blocks parameter missing defaults to 5 but malformed types may cause errors
- Upstream Subtensor node syncing lag may return stale or incomplete block data

## How this service works

Per-block extrinsic and event counts for the last N blocks (1-10) on the Bittensor (Subtensor) Substrate blockchain using direct JSON-RPC.

## Output

An array of data for each requested finalized Bittensor block, including block height, block hash, extrinsic count, and event count — sourced directly from the Subtensor JSON-RPC node.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "blocks": {
       "type": "integer",
       "maximum": 10,
       "minimum": 1,
       "description": "Number of recent finalized blocks to inspect (1-10, default 5)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bittensor-subtensor-block-metrics-b558167c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
