# Kaspa DAG Chain Density

> Kaspa DAG Chain Density is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-21).

Returns the ratio of selected-chain blocks to total DAG blocks over a configurable recent window (2–20 blocks), measuring DAG concurrency and block propagation density on the Kaspa network.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/kaspa-chain-density?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kaspa-dag-chain-density-1d859635
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GSy2Y4qql1O88b-dyT0ST

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 kaspa-dag-chain-density-1d859635
```

Example prompt: What's the current Kaspa DAG chain density? Check it over a window of 10 blocks and tell me the ratio of selected-chain blocks to total DAG blocks.

## When to prefer this

Use this endpoint when you need a lightweight, quantitative measure of Kaspa DAG concurrency and block propagation health — specifically the selected-chain-to-total-DAG block ratio — rather than full block-by-block data or transaction-level detail.

## Known failure modes

- Invalid blocks parameter outside 2–20 range returns a 400 or validation error
- Upstream Kaspa node unavailability may return a 503 or timeout
- Stale data if the node is behind the network tip
- Payment not received or x402 protocol failure blocks the request

## How this service works

Ratio of selected-chain blocks to total DAG blocks created and merged across a recent window (2-20 blocks) on Kaspa, measuring DAG concurrency and block propagation density.

## Output

Returns the ratio of selected-chain blocks to total DAG blocks created and merged over the specified window, along with the raw counts and a measure of DAG concurrency and block propagation density for the Kaspa network.

## 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": 20,
       "minimum": 2,
       "description": "Number of selected-chain blocks to inspect (default 5, min 2, max 20)."
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kaspa-dag-chain-density-1d859635/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)
